mirror of
https://github.com/git/git.git
synced 2026-01-10 10:13:33 +00:00
filter-branch: return 2 when nothing to rewrite
Using the --state-branch option allows us to perform incremental filtering. This may lead to having nothing to rewrite in subsequent filtering, so we need a way to recognize this case. So, let's exit with 2 instead of 1 when this "error" occurs. Signed-off-by: Michele Locati <michele@locati.it> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
38e79b1fda
commit
0a0eb2e585
@@ -310,7 +310,7 @@ git rev-list --reverse --topo-order --default HEAD \
|
||||
die "Could not get the commits"
|
||||
commits=$(wc -l <../revs | tr -d " ")
|
||||
|
||||
test $commits -eq 0 && die "Found nothing to rewrite"
|
||||
test $commits -eq 0 && die_with_status 2 "Found nothing to rewrite"
|
||||
|
||||
# Rewrite the commits
|
||||
report_progress ()
|
||||
|
||||
Reference in New Issue
Block a user