diff options
author | Junio C Hamano <junkio@cox.net> | 2006-09-17 18:20:02 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-17 18:20:02 -0700 |
commit | 2874172101600666d30ceae92d27025849509066 (patch) | |
tree | 1fcd1bdfed9a643b2d87e373cbbfc56a29eabcca | |
parent | b467fb0b909883f28c4653361ccfa530ccf1a03e (diff) | |
parent | c95b138985186992b222321f332cf92edbbd4141 (diff) | |
download | git-2874172101600666d30ceae92d27025849509066.tar.gz |
Merge branch 'jc/am'
* jc/am:
Fix git-am safety checks
-rwxr-xr-x | git-am.sh | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -166,10 +166,25 @@ fi if test -d "$dotest" then - if test ",$#," != ",0," || ! tty -s - then - die "previous dotest directory $dotest still exists but mbox given." - fi + case "$#,$skip$resolved" in + 0,*t*) + # Explicit resume command and we do not have file, so + # we are happy. + : ;; + 0,) + # No file input but without resume parameters; catch + # user error to feed us a patch from standard input + # when there is already .dotest. This is somewhat + # unreliable -- stdin could be /dev/null for example + # and the caller did not intend to feed us a patch but + # wanted to continue unattended. + tty -s + ;; + *) + false + ;; + esac || + die "previous dotest directory $dotest still exists but mbox given." resume=yes else # Make sure we are not given --skip nor --resolved |