summaryrefslogtreecommitdiff
path: root/git-filter-branch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-filter-branch.sh')
-rwxr-xr-xgit-filter-branch.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 41efecb..64f2154 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -320,7 +320,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 ()
@@ -637,12 +637,12 @@ then
print H "$_:$f\n" or die;
}
close(H) or die;' || die "Unable to save state")
- state_tree=$(/bin/echo -e "100644 blob $state_blob\tfilter.map" | git mktree)
+ state_tree=$(printf '100644 blob %s\tfilter.map\n' "$state_blob" | git mktree)
if test -n "$state_commit"
then
- state_commit=$(/bin/echo "Sync" | git commit-tree "$state_tree" -p "$state_commit")
+ state_commit=$(echo "Sync" | git commit-tree "$state_tree" -p "$state_commit")
else
- state_commit=$(/bin/echo "Sync" | git commit-tree "$state_tree" )
+ state_commit=$(echo "Sync" | git commit-tree "$state_tree" )
fi
git update-ref "$state_branch" "$state_commit"
fi