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:
Elia Pinto 2014-06-06 07:55:52 -07:00 коммит произвёл Junio C Hamano
Родитель 1cb4937395
Коммит e425f6ad4d
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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,