summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2010-01-22 09:22:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-22 21:18:14 (GMT)
commit8cddaeec0d40e68202a6afae5d09024ac1b5db9c (patch)
treeabac03c9f7a4e90aa217c0b15bf88a005aae0421 /git-rebase--interactive.sh
parent3bb7256281bb1d291bb705a57dc3f30b26b7c127 (diff)
downloadgit-8cddaeec0d40e68202a6afae5d09024ac1b5db9c.zip
git-8cddaeec0d40e68202a6afae5d09024ac1b5db9c.tar.gz
git-8cddaeec0d40e68202a6afae5d09024ac1b5db9c.tar.bz2
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>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index e551906..c2f6089 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)