From: Asheesh Laroia Date: Fri, 8 Feb 2013 01:16:24 +0000 (-0800) Subject: git-mergetool: print filename when it contains % X-Git-Tag: v1.8.2-rc0~19^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59cf706b2381d99b39c4d1daf62da9eeccf0ec13;p=git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-mergetool.sh b/git-mergetool.sh index c50e18a899..012afa5549 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -440,7 +440,7 @@ then fi printf "Merging:\n" -printf "$files\n" +printf "%s\n" "$files" IFS=' '