summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2014-06-06 07:55:52 -0700
committerJunio C Hamano <gitster@pobox.com>2014-06-09 14:47:07 -0700
commite425f6ad4d14d49fee09712af0aa6f56037e7dd7 (patch)
tree9b003662382e4cb4f1c769e4ec738cef13424d34 /git-rebase--interactive.sh
parent1cb493739540bd196848a59f9b7765b0622f725c (diff)
downloadgit-e425f6ad4d14d49fee09712af0aa6f56037e7dd7.tar.gz
git-rebase--interactive.sh: avoid "test <cond> -a/-o <cond>"
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 6ec9d3cb40..797571f50c 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -1013,7 +1013,7 @@ then
git rev-list $revisions |
while read rev
do
- if test -f "$rewritten"/$rev -a "$(sane_grep "$rev" "$state_dir"/not-cherry-picks)" = ""
+ if test -f "$rewritten"/$rev && test "$(sane_grep "$rev" "$state_dir"/not-cherry-picks)" = ""
then
# Use -f2 because if rev-list is telling us this commit is
# not worthwhile, we don't want to track its multiple heads,