From: Junio C Hamano Date: Tue, 20 Mar 2018 21:22:48 +0000 (-0700) Subject: Merge branch 'ml/filter-branch-portability-fix' into next X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c7c17cfc8bada5c195f64be582f25a015ee8dbd4?hp=a9ca8172c746cd4a9abf15fee37935caa81b27e9 Merge branch 'ml/filter-branch-portability-fix' into next Shell script portability fix. * ml/filter-branch-portability-fix: filter-branch: use printf instead of echo -e --- diff --git a/git-filter-branch.sh b/git-filter-branch.sh index c285fdb90d..2587a01b9b 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -627,12 +627,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