From ab680dce2b565d285ac538fc931bd4b93beb68c8 Mon Sep 17 00:00:00 2001 From: Paul Tan Date: Mon, 15 Jun 2015 19:08:10 +0800 Subject: am: teach StGit patch parser how to read from stdin git-mailsplit, which splits mbox patches, will read the patch from stdin when the filename is "-" or there are no files listed on the command-line. To be consistent with this behavior, teach the StGit patch parser to read from stdin if the filename is "-" or no files are listed on the command-line. Based-on-patch-by: Chris Packham Helped-by: Junio C Hamano Signed-off-by: Paul Tan Signed-off-by: Junio C Hamano --- git-am.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'git-am.sh') diff --git a/git-am.sh b/git-am.sh index a67d0f9898..1f4c09e3d4 100755 --- a/git-am.sh +++ b/git-am.sh @@ -297,6 +297,7 @@ split_patches () { ;; stgit) this=0 + test 0 -eq "$#" && set -- - for stgit in "$@" do this=$(expr "$this" + 1) @@ -318,7 +319,7 @@ split_patches () { print "Subject: ", $_ ; $subject = 1; } - ' < "$stgit" > "$dotest/$msgnum" || clean_abort + ' -- "$stgit" >"$dotest/$msgnum" || clean_abort done echo "$this" > "$dotest/last" this= -- cgit v1.3