diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-18 16:11:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-18 16:11:40 -0700 |
commit | 29df2385d09611219c53d07f453794d6146e73a3 (patch) | |
tree | 67b002c58d9c35035020b7e8336688be2338f3cb /git-am.sh | |
parent | 11dc4e70c33c2fbbff19014035d3bf624da1902c (diff) | |
download | git-29df2385d09611219c53d07f453794d6146e73a3.tar.gz git-29df2385d09611219c53d07f453794d6146e73a3.tar.xz |
am: POSIX portability fix
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>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-x | git-am.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -302,7 +302,7 @@ do 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 |