@matheusbsbs / matheus-bagliano / commits / 4d2e283a1e
Fork 0

git-am: re-fix the diag message printing

The $FIRSTLINE variable is from the user's commit and can contain arbitrary backslash escapes that may be (mis)interpreted when given to "echo", depending on the implementation. Use "printf" to work around the issue. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jan 18, 2009 at 19:34 UTC 4d2e283a1ecda43de9b5cafea27b68a08dfd5767
1 file changed +1 -1
git-am.sh
+1 -1
@@ -501,7 +501,7 @@ do
501 fi
502 if test $apply_status != 0
503 then
504 - echo "Patch failed at $msgnum $FIRSTLINE"
504 + printf 'Patch failed at %s %s\n' "$msgnum" "$FIRSTLINE"
505 stop_here_user_resolve $this
506 fi
507