Skip to content

Commit e425f6a

Browse files
devzero2000gitster
authored andcommitted
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 <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1cb4937 commit e425f6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-rebase--interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ then
10131013
git rev-list $revisions |
10141014
while read rev
10151015
do
1016-
if test -f "$rewritten"/$rev -a "$(sane_grep "$rev" "$state_dir"/not-cherry-picks)" = ""
1016+
if test -f "$rewritten"/$rev && test "$(sane_grep "$rev" "$state_dir"/not-cherry-picks)" = ""
10171017
then
10181018
# Use -f2 because if rev-list is telling us this commit is
10191019
# not worthwhile, we don't want to track its multiple heads,

0 commit comments

Comments
 (0)