Code

Allow git-mergetool to handle paths with a leading space
authorRogan Dawes <rogan@dawes.za.net>
Mon, 7 Jan 2008 07:37:38 +0000 (09:37 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Jan 2008 05:00:54 +0000 (21:00 -0800)
Signed-off-by: Rogan Dawes <rogan@dawes.za.net>
git-mergetool.sh

index 2f31fa2417300180662b66afdde11bdf1d6febb2..cbbb707959cc64427f7bbd7bfefb0a8f0f263596 100755 (executable)
@@ -393,8 +393,11 @@ if test $# -eq 0 ; then
                echo "No files need merging"
                exit 0
        fi
-       echo Merging the files: $files
-       git ls-files -u | sed -e 's/^[^ ]*      //' | sort -u | while read i
+       echo Merging the files: "$files"
+       git ls-files -u |
+       sed -e 's/^[^   ]*      //' |
+       sort -u |
+       while IFS= read i
        do
                printf "\n"
                merge_file "$i" < /dev/tty > /dev/tty