git-am: interactive should fail gracefully.
When feeding patches from standard input, and --interactive is specified, quit, so that the user can re-run the command, instead of infinitely looping. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
221e743c03
commit
a1451104ac
@ -172,7 +172,6 @@ else
|
|||||||
echo "$sign" >"$dotest/sign"
|
echo "$sign" >"$dotest/sign"
|
||||||
echo "$utf8" >"$dotest/utf8"
|
echo "$utf8" >"$dotest/utf8"
|
||||||
echo "$keep" >"$dotest/keep"
|
echo "$keep" >"$dotest/keep"
|
||||||
echo "$threeway" >"$dotest/3way"
|
|
||||||
echo 1 >"$dotest/next"
|
echo 1 >"$dotest/next"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -193,7 +192,6 @@ then
|
|||||||
else
|
else
|
||||||
SIGNOFF=
|
SIGNOFF=
|
||||||
fi
|
fi
|
||||||
threeway=$(cat "$dotest/3way")
|
|
||||||
|
|
||||||
last=`cat "$dotest/last"`
|
last=`cat "$dotest/last"`
|
||||||
this=`cat "$dotest/next"`
|
this=`cat "$dotest/next"`
|
||||||
@ -256,6 +254,8 @@ do
|
|||||||
|
|
||||||
if test "$interactive" = t
|
if test "$interactive" = t
|
||||||
then
|
then
|
||||||
|
test -t 0 ||
|
||||||
|
die "cannot be interactive without stdin connected to a terminal."
|
||||||
action=again
|
action=again
|
||||||
while test "$action" = again
|
while test "$action" = again
|
||||||
do
|
do
|
||||||
|
Loading…
Reference in New Issue
Block a user