From b3f041fb0f7de167dbb6711b0a231d36c4b5de08 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 13 Dec 2005 22:39:23 -0800 Subject: git-am support for naked email messages (take 2) This allows git-am to accept single-message files as well as mboxes. Unlike the previous version, this one doesn't need to be explicitly told which one it is; rather, it looks to see if the first line is a From line and uses it to select mbox mode or not. I moved the logic to do all this into git-mailsplit, which got a new user interface as result, although the old interface is still available for backwards compatibility. [jc: applied with two obvious fixes.] Signed-off-by: H. Peter Anvin Signed-off-by: Junio C Hamano --- git-am.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'git-am.sh') diff --git a/git-am.sh b/git-am.sh index 6ed527c7a..f143b7e78 100755 --- a/git-am.sh +++ b/git-am.sh @@ -164,10 +164,7 @@ else # Start afresh. mkdir -p "$dotest" || exit - # cat does the right thing for us, including '-' to mean - # standard input. - cat "$@" | - git-mailsplit -d$prec "$dotest/" >"$dotest/last" || { + git-mailsplit -d"$prec" -o"$dotest" -b -- "$@" > "$dotest/last" || { rm -fr "$dotest" exit 1 } -- cgit v1.2.1