author | Brandon Casey <drafnel@gmail.com> | |
Thu, 30 Jun 2011 00:34:57 +0000 (19:34 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 30 Jun 2011 01:24:40 +0000 (18:24 -0700) | ||
commit | 91cd7e4b426b0dc4755212fcbac3c822499ddd15 | |
tree | 070cfe76038a274cbe3b40633c80bf49c879a8aa | tree | snapshot |
parent | 98dbe63dbcb44218e23ccc92e1491c36b2e31945 | commit | diff |
t/t7407: demonstrate that the command called by 'submodule foreach' loses stdin
The user-supplied command spawned by 'submodule foreach' loses its
connection to the original standard input. Instead, it is connected to the
output of a pipe within the git-submodule script. This can cause a problem
if the command requires reading from stdin or if it changes its behavior
based on whether stdin is a tty or not (e.g. git shortlog). Demonstrate
this flaw.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The user-supplied command spawned by 'submodule foreach' loses its
connection to the original standard input. Instead, it is connected to the
output of a pipe within the git-submodule script. This can cause a problem
if the command requires reading from stdin or if it changes its behavior
based on whether stdin is a tty or not (e.g. git shortlog). Demonstrate
this flaw.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7407-submodule-foreach.sh | diff | blob | history |