@matheusbsbs / matheus-bagliano / commits / 8cddaeec0d
Fork 0

rebase -i: Avoid non-portable "test X -a Y"

Reported by: Eric Blake <ebb9@byu.net> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Jan 22, 2010 at 10:22 UTC 8cddaeec0d40e68202a6afae5d09024ac1b5db9c
1 file changed +1 -1
git-rebase--interactive.sh
+1 -1
@@ -235,7 +235,7 @@ pick_one () {
235 parent_sha1=$(git rev-parse --verify $sha1^) ||
236 die "Could not get the parent of $sha1"
237 current_sha1=$(git rev-parse --verify HEAD)
238 - if test -z "$no_ff" -a "$current_sha1" = "$parent_sha1"
238 + if test -z "$no_ff" && test "$current_sha1" = "$parent_sha1"
239 then
240 output git reset --hard $sha1
241 output warn Fast-forward to $(git rev-parse --short $sha1)