1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-19 23:26:13 +02:00

git-mergetool: print filename when it contains %

If git-mergetool was invoked with files with a percent sign (%) in
their names, it would print an error.  For example, if you were
calling mergetool on a file called "%2F":

    printf: %2F: invalid directive

Do not pass random string to printf as if it were a valid format.
Use format string "%s" and pass the string as data to be formatted
instead.

Signed-off-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Asheesh Laroia 2013-02-07 17:16:24 -08:00 committed by Junio C Hamano
parent 7e2010537e
commit 59cf706b23

View File

@ -440,7 +440,7 @@ then
fi
printf "Merging:\n"
printf "$files\n"
printf "%s\n" "$files"
IFS='
'