mirror of
https://github.com/git/git.git
synced 2024-11-25 10:54:00 +08:00
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>
This commit is contained in:
parent
1cb4937395
commit
e425f6ad4d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user