Repository navigation
1.4.0
This release makes git-cl reliable in scripts and integrations. Failing commands now exit with a non-zero code, and errors go to stderr.
⚠️ Behaviour change
Previously, most failing commands exited with 0 and printed their error on stdout. From 1.4.0:
| Situation | Exit code |
|---|---|
| Success, including "nothing to do" | 0 |
| Error, or a partial failure (e.g. one of several names not found) | 1 |
| Invalid usage (unknown command, missing argument) | 2 |
- Errors, warnings and their hints are printed on stderr. Regular output stays on stdout.
- Messages for a missing changelist now start with
Error:. - Refusing to unstash onto a branch with a dirty working directory is now reported as an error rather than a warning.
If you read git-cl output in a tool or script, check that it reads error messages from stderr and relies on the exit code rather than on message text. Commands such as git cl commit docs -m "…" && git push now work as you would expect.
See Error Handling and Exit Codes in the design notes for the full rules.
Other changes
- The prune hook setup is easier to find in the documentation (#65)
- Updated GitHub Actions (#62, #63, #64)
Pull requests
- Return exit code 1 on errors and print errors on stderr by @BHFock in #66
- Make the prune hook setup easier to find by @BHFock in #65
- Update GitHub actions by @BHFock in #62
- Bump actions/checkout from 6 to 7 by @dependabot in #63
- Bump actions/setup-python from 6 to 7 by @dependabot in #64
Full Changelog: 1.3.0...1.4.0