Merge branch 'jk/rebase-interative-eval-fix'
authorJunio C Hamano <gitster@pobox.com>
Tue, 17 May 2016 21:38:35 +0000 (14:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 May 2016 21:38:35 +0000 (14:38 -0700)
Portability enhancement for "rebase -i" to help platforms whose
shell does not like "for i in <empty>" (which is not POSIX-kosher).

* jk/rebase-interative-eval-fix:
rebase--interactive: avoid empty list in shell for-loop

git-rebase--interactive.sh
index 9ea30756f13349c96784f0091da4c3c667166485..1c6dfb6d5618f43eaac1c279332d33e6a913c2d9 100644 (file)
@@ -82,6 +82,7 @@ rewritten_pending="$state_dir"/rewritten-pending
 cr=$(printf "\015")
 
 strategy_args=${strategy:+--strategy=$strategy}
+test -n "$strategy_opts" &&
 eval '
        for strategy_opt in '"$strategy_opts"'
        do