From: Jay Soffian Date: Wed, 28 Jan 2009 15:03:09 GMT Subject: [PATCH v3 1/2] git-am: emit usage when called w/o arguments and w/o patch on stdin Message-ID: <1233154990-19745-1-git-send-email-jaysoffian@gmail.com> When git am is called w/o arguments, w/o a patch on stdin and the user hits ctrl-c, it leaves behind a partially populated $dotest directory. After this commit, it emits usage when called w/o arguments and w/o a patch on stdin. Noticed by Sverre Rabbelier Signed-off-by: Jay Soffian --- Change from v2: make Junio happy by no longer removing $dotest if git-am is interupted while mailsplit is running. git-am.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/git-am.sh b/git-am.sh index b1c05c9..92a64b2 100755 --- a/git-am.sh +++ b/git-am.sh @@ -254,6 +254,7 @@ else done shift fi + test $# = 0 && test -t 0 && usage git mailsplit -d"$prec" -o"$dotest" -b -- "$@" > "$dotest/last" || { rm -fr "$dotest" exit 1 -- 1.6.1.224.gb56c