Skip to content

Commit f46cdf4

Browse files
committed
Merge branch 'ml/filter-branch-portability-fix'
Shell script portability fix. * ml/filter-branch-portability-fix: filter-branch: use printf instead of echo -e
2 parents 4c5dbf1 + 206a6ae commit f46cdf4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git-filter-branch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,12 +627,12 @@ then
627627
print H "$_:$f\n" or die;
628628
}
629629
close(H) or die;' || die "Unable to save state")
630-
state_tree=$(/bin/echo -e "100644 blob $state_blob\tfilter.map" | git mktree)
630+
state_tree=$(printf '100644 blob %s\tfilter.map\n' "$state_blob" | git mktree)
631631
if test -n "$state_commit"
632632
then
633-
state_commit=$(/bin/echo "Sync" | git commit-tree "$state_tree" -p "$state_commit")
633+
state_commit=$(echo "Sync" | git commit-tree "$state_tree" -p "$state_commit")
634634
else
635-
state_commit=$(/bin/echo "Sync" | git commit-tree "$state_tree" )
635+
state_commit=$(echo "Sync" | git commit-tree "$state_tree" )
636636
fi
637637
git update-ref "$state_branch" "$state_commit"
638638
fi

0 commit comments

Comments
 (0)