summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-13 01:31:41 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-10-13 01:31:41 (GMT)
commita1451104ac2aa97f2e74818787ff54e29b2a77e5 (patch)
tree9e0e6a83fd74c950fa6902de15176d7e6d0af2a3 /git-am.sh
parent221e743c037fc1f9a729adc760546d23df9544a7 (diff)
downloadgit-a1451104ac2aa97f2e74818787ff54e29b2a77e5.zip
git-a1451104ac2aa97f2e74818787ff54e29b2a77e5.tar.gz
git-a1451104ac2aa97f2e74818787ff54e29b2a77e5.tar.bz2
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>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-am.sh b/git-am.sh
index 9e41e70..85d6826 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -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
@@ -193,7 +192,6 @@ then
else
SIGNOFF=
fi
-threeway=$(cat "$dotest/3way")
last=`cat "$dotest/last"`
this=`cat "$dotest/next"`
@@ -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