| 1 | # Copyright 2023 The ChromiumOS Authors |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | """Hook to stop people from running `git cl`.""" |
| 6 | |
| 7 | import sys |
| 8 | |
| 9 | |
| 10 | USE_PYTHON3 = True |
| 11 | |
| 12 | |
| 13 | def CheckChangeOnUpload(_input_api, _output_api): |
| 14 | print( |
| 15 | "ERROR: CrOS repos use `repo upload`, not `git cl upload`.\n" |
| 16 | "See https://chromium.googlesource.com/chromiumos/docs/+/HEAD/contributing.md#upload-changes.", |
| 17 | file=sys.stderr, |
| 18 | ) |
| 19 | sys.exit(1) |