Skip to content

Commit

Permalink
git-am: interactive should fail gracefully.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Oct 13, 2005
1 parent 221e743 commit a145110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ else
echo "$sign" >"$dotest/sign"
echo "$utf8" >"$dotest/utf8"
echo "$keep" >"$dotest/keep"
echo "$threeway" >"$dotest/3way"
echo 1 >"$dotest/next"
fi

Expand All @@ -193,7 +192,6 @@ then
else
SIGNOFF=
fi
threeway=$(cat "$dotest/3way")

last=`cat "$dotest/last"`
this=`cat "$dotest/next"`
Expand Down Expand Up @@ -256,6 +254,8 @@ do

if test "$interactive" = t
then
test -t 0 ||
die "cannot be interactive without stdin connected to a terminal."
action=again
while test "$action" = again
do
Expand Down

0 comments on commit a145110

Please sign in to comment.