mirror of
https://github.com/git/git
synced 2024-10-30 04:01:21 +00:00
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>
This commit is contained in:
parent
11dc4e70c3
commit
29df2385d0
1 changed files with 1 additions and 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
|
||||
|
|
Loading…
Reference in a new issue