summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11dc4e7)
raw | patch | inline | side by side (parent: 11dc4e7)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 18 Apr 2008 23:11:40 +0000 (16:11 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 18 Apr 2008 23:11:40 +0000 (16:11 -0700) |
POSIX allows echo without flag to interpret specials such as \n, and we
tried to make things portable by using printf instead where it matters.
Recently added code to "git am" had unprotected "echo", which was caught
by t4014 and RĂ©mi Vanicat.
This should fix it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tried to make things portable by using printf instead where it matters.
Recently added code to "git am" had unprotected "echo", which was caught
by t4014 and RĂ©mi Vanicat.
This should fix it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 6be33d9ddbb27c5085d677855ad6c6c555b82805..851f85eb55f2ea078991c083711d172db9db8d1b 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$dotest/info")"
case "$keep_subject" in -k) SUBJECT="[PATCH] $SUBJECT" ;; esac
- (echo "$SUBJECT" ; echo ; cat "$dotest/msg") |
+ (printf '%s\n\n' "$SUBJECT"; cat "$dotest/msg") |
git stripspace > "$dotest/msg-clean"
;;
esac