Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 59cf706

Browse files
paulproteusgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7e20105 commit 59cf706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-mergetool.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ then
440440
fi
441441

442442
printf "Merging:\n"
443-
printf "$files\n"
443+
printf "%s\n" "$files"
444444

445445
IFS='
446446
'

0 commit comments

Comments
 (0)