Repository navigation
1.5.0
This release adds --exit-code to git cl prune, so scripts and editor integrations can check for stale entries without parsing the output.
New: git cl prune --exit-code
With --exit-code, the exit code tells whether there are stale entries, following git diff --exit-code:
| Situation | Exit code |
|---|---|
| No stale entries | 0 |
Stale entries found (removed, or only listed with --dry-run) |
1 |
| Error, e.g. outside a Git repository | 2 |
Combined with --dry-run and --quiet, this is a check with no output:
if ! git cl prune --dry-run --quiet --exit-code; then
echo "stale changelist entries"
fiWithout the flag, nothing changes: git cl prune exits with 0 on success and 1 on error, like every other git-cl command. See 3.3 Prune stale entries in the tutorial.
Thanks to @patrickwolf for suggesting this in #70.
Pull requests
Full Changelog: 1.4.3...1.5.0