@matheusbsbs / matheus-bagliano / commits / a1451104ac
Fork 0

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>

Junio C Hamano committed Oct 12, 2005 at 18:31 UTC a1451104ac2aa97f2e74818787ff54e29b2a77e5
1 file changed +2 -2
git-am.sh
+2 -2
@@ -172,7 +172,6 @@ else
172 echo "$sign" >"$dotest/sign"
173 echo "$utf8" >"$dotest/utf8"
174 echo "$keep" >"$dotest/keep"
175 - echo "$threeway" >"$dotest/3way"
175 echo 1 >"$dotest/next"
176 fi
177
@@ -193,7 +192,6 @@ then
192 else
193 SIGNOFF=
194 fi
196 -threeway=$(cat "$dotest/3way")
195
196 last=`cat "$dotest/last"`
197 this=`cat "$dotest/next"`
@@ -256,6 +254,8 @@ do
254
255 if test "$interactive" = t
256 then
257 + test -t 0 ||
258 + die "cannot be interactive without stdin connected to a terminal."
259 action=again
260 while test "$action" = again
261 do