From 8cddaeec0d40e68202a6afae5d09024ac1b5db9c Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Fri, 22 Jan 2010 10:22:29 +0100 Subject: [PATCH] rebase -i: Avoid non-portable "test X -a Y" Reported by: Eric Blake Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- git-rebase--interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index e551906ec..c2f6089de 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -235,7 +235,7 @@ pick_one () { parent_sha1=$(git rev-parse --verify $sha1^) || die "Could not get the parent of $sha1" current_sha1=$(git rev-parse --verify HEAD) - if test -z "$no_ff" -a "$current_sha1" = "$parent_sha1" + if test -z "$no_ff" && test "$current_sha1" = "$parent_sha1" then output git reset --hard $sha1 output warn Fast-forward to $(git rev-parse --short $sha1) -- 2.26.2