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>
Asheesh Laroia committed
Feb 7, 2013 at 17:16 UTC
59cf706b2381d99b39c4d1daf62da9eeccf0ec13
1 file changed
+1
-1
git-mergetool.sh
+1
-1
@@ -440,7 +440,7 @@ then
440
fi
441
442
printf "Merging:\n"
443
-printf "$files\n"
443
+printf "%s\n" "$files"
444
445
IFS='
446
'