Merge branch 'jk/rebase-interative-eval-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2016 20:17:24 +0000 (13:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2016 20:17:24 +0000 (13:17 -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 4cde685b43a4463bac5f96bcb4f8ed8b3e9347be..655ebaa4717fe6e43b4b16a69e5eb282140edd6d 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