Skip to content

Commit 4d2e283

Browse files
committed
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 <[email protected]>
1 parent a70d410 commit 4d2e283

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-am.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ do
501501
fi
502502
if test $apply_status != 0
503503
then
504-
echo "Patch failed at $msgnum $FIRSTLINE"
504+
printf 'Patch failed at %s %s\n' "$msgnum" "$FIRSTLINE"
505505
stop_here_user_resolve $this
506506
fi
507507

0 commit comments

Comments
 (0)