summaryrefslogtreecommitdiff
path: root/git-filter-branch.sh
diff options
context:
space:
mode:
authorMichele Locati <michele@locati.it>2018-03-15 17:09:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-15 17:41:51 (GMT)
commit0a0eb2e585788567094248652fc20450a0db642b (patch)
tree69e102a753ff6042747c5466dae8f58bfa2081a1 /git-filter-branch.sh
parent38e79b1fdab9244e1727d0698afcf3bb8956c0a4 (diff)
downloadgit-0a0eb2e585788567094248652fc20450a0db642b.zip
git-0a0eb2e585788567094248652fc20450a0db642b.tar.gz
git-0a0eb2e585788567094248652fc20450a0db642b.tar.bz2
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>
Diffstat (limited to 'git-filter-branch.sh')
-rwxr-xr-xgit-filter-branch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 1b7e4b2..c285fdb 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -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 ()