Code

Merge branch 'bc/submodule-foreach-stdin-fix-1.7.4'
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Jul 2011 21:31:37 +0000 (14:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Jul 2011 21:31:37 +0000 (14:31 -0700)
* bc/submodule-foreach-stdin-fix-1.7.4:
  git-submodule.sh: preserve stdin for the command spawned by foreach
  t/t7407: demonstrate that the command called by 'submodule foreach' loses stdin

Conflicts:
git-submodule.sh

1  2 
git-submodule.sh
t/t7407-submodule-foreach.sh

index cfd5aa60491a88534aeacb7fe70141aa391675a9,07dc675cef2c71e487648a4bd8cc18f4d93db917..87c9452c8a8ae179ffb7e7958ba95688e95bd0e9
@@@ -320,8 -305,8 +324,8 @@@ cmd_foreach(
                                then
                                        cmd_foreach "--recursive" "$@"
                                fi
-                       ) ||
+                       ) <&3 3<&- ||
 -                      die "Stopping at '$path'; script returned non-zero status."
 +                      die "$(eval_gettext "Stopping at '\$path'; script returned non-zero status.")"
                fi
        done
  }
Simple merge