git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] git-am: emit usage when called w/o arguments and w/o patch on stdin
@ 2009-01-28 15:03 Jay Soffian
  2009-01-28 15:03 ` [PATCH v3 2/2] git-am: minor cleanups Jay Soffian
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jay Soffian @ 2009-01-28 15:03 UTC (permalink / raw)
  To: git; +Cc: Jay Soffian, gitster, sverre

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 <jaysoffian@gmail.com>
---
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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-01-28 18:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-28 15:03 [PATCH v3 1/2] git-am: emit usage when called w/o arguments and w/o patch on stdin Jay Soffian
2009-01-28 15:03 ` [PATCH v3 2/2] git-am: minor cleanups Jay Soffian
2009-01-28 16:18 ` [PATCH v3 1/2] git-am: emit usage when called w/o arguments and w/o patch on stdin Pieter de Bie
2009-01-28 16:40   ` Jay Soffian
2009-01-28 18:15     ` Junio C Hamano
2009-01-28 18:26       ` Jay Soffian
2009-01-28 18:33         ` Sverre Rabbelier
2009-01-28 17:51   ` Jeff King
2009-01-28 18:52 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).