{"thread":{"id":"27681","subject":"[PATCH 1/2] mergetool: Add tests for filename with whitespace","startedAt":"2011-06-22T02:40:23Z","lastAt":"2011-06-22T21:11:14Z","messageCount":2,"participants":["Jonathon Mah","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"170443","messageId":"734F376D-0CF5-4417-8DC2-8A46AA05D995@JonathonMah.com","threadId":"27681","inReplyTo":null,"subject":"[PATCH 1/2] mergetool: Add tests for filename with whitespace","fromName":"Jonathon Mah","fromEmail":"me@jonathonmah.com","sentAt":"2011-06-22T02:40:23Z","receivedAt":"2011-06-22T02:40:23Z","isPatch":true,"sender":{"key":"me@jonathonmah.com","avatar":"https://avatars.githubusercontent.com/u/2748?v=4"},"body":"Signed-off-by: Jonathon Mah <me@JonathonMah.com>\n---\n t/t7610-mergetool.sh |   30 +++++++++++++++++-------------\n 1 files changed, 17 insertions(+), 13 deletions(-)\n\ndiff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\nindex cbc08e3..f00caa3 100755\n--- a/t/t7610-mergetool.sh\n+++ b/t/t7610-mergetool.sh\n@@ -16,6 +16,7 @@ Testing basic merge tool invocation'\n test_expect_success 'setup' '\n     git config rerere.enabled true &&\n     echo master >file1 &&\n+    echo master spaced >\"spaced name\" &&\n     echo master file11 >file11 &&\n     echo master file12 >file12 &&\n     echo master file13 >file13 &&\n@@ -30,13 +31,14 @@ test_expect_success 'setup' '\n \tgit commit -m \"Add foo\"\n     ) &&\n     git submodule add git://example.com/submod submod &&\n-    git add file1 file1[1-4] subdir/file3 .gitmodules submod &&\n+    git add file1 \"spaced name\" file1[1-4] subdir/file3 .gitmodules submod &&\n     git commit -m \"add initial versions\" &&\n \n     git checkout -b branch1 master &&\n     git submodule update -N &&\n     echo branch1 change >file1 &&\n     echo branch1 newfile >file2 &&\n+    echo branch1 spaced >\"spaced name\" &&\n     echo branch1 change file11 >file11 &&\n     echo branch1 change file13 >file13 &&\n     echo branch1 sub >subdir/file3 &&\n@@ -47,7 +49,7 @@ test_expect_success 'setup' '\n \tgit commit -m \"Add bar on branch1\" &&\n \tgit checkout -b submod-branch1\n     ) &&\n-    git add file1 file11 file13 file2 subdir/file3 submod &&\n+    git add file1 \"spaced name\" file11 file13 file2 subdir/file3 submod &&\n     git rm file12 &&\n     git commit -m \"branch1 changes\" &&\n \n@@ -55,6 +57,7 @@ test_expect_success 'setup' '\n     git submodule update -N &&\n     echo master updated >file1 &&\n     echo master new >file2 &&\n+    echo master updated spaced >\"spaced name\" &&\n     echo master updated file12 >file12 &&\n     echo master updated file14 >file14 &&\n     echo master new sub >subdir/file3 &&\n@@ -65,7 +68,7 @@ test_expect_success 'setup' '\n \tgit commit -m \"Add bar on master\" &&\n \tgit checkout -b submod-master\n     ) &&\n-    git add file1 file12 file14 file2 subdir/file3 submod &&\n+    git add file1 \"spaced name\" file12 file14 file2 subdir/file3 submod &&\n     git rm file11 &&\n     git commit -m \"master updates\" &&\n \n@@ -79,7 +82,7 @@ test_expect_success 'custom mergetool' '\n     git submodule update -N &&\n     test_must_fail git merge master >/dev/null 2>&1 &&\n     ( yes \"\" | git mergetool file1 >/dev/null 2>&1 ) &&\n-    ( yes \"\" | git mergetool file2 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool file2 \"spaced name\" >/dev/null 2>&1 ) &&\n     ( yes \"\" | git mergetool subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file12 >/dev/null 2>&1 ) &&\n@@ -97,6 +100,7 @@ test_expect_success 'mergetool crlf' '\n     test_must_fail git merge master >/dev/null 2>&1 &&\n     ( yes \"\" | git mergetool file1 >/dev/null 2>&1 ) &&\n     ( yes \"\" | git mergetool file2 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool \"spaced name\" >/dev/null 2>&1 ) &&\n     ( yes \"\" | git mergetool subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file12 >/dev/null 2>&1 ) &&\n@@ -126,7 +130,7 @@ test_expect_success 'mergetool on file in parent dir' '\n     (\n \tcd subdir &&\n \t( yes \"\" | git mergetool ../file1 >/dev/null 2>&1 ) &&\n-\t( yes \"\" | git mergetool ../file2 >/dev/null 2>&1 ) &&\n+\t( yes \"\" | git mergetool ../file2 ../spaced\\ name >/dev/null 2>&1 ) &&\n \t( yes \"d\" | git mergetool ../file11 >/dev/null 2>&1 ) &&\n \t( yes \"d\" | git mergetool ../file12 >/dev/null 2>&1 ) &&\n \t( yes \"l\" | git mergetool ../submod >/dev/null 2>&1 ) &&\n@@ -189,7 +193,7 @@ test_expect_success 'deleted vs modified submodule' '\n     git checkout -b test6.a test6 &&\n     test_must_fail git merge master &&\n     test -n \"$(git ls-files -u)\" &&\n-    ( yes \"\" | git mergetool file1 file2 subdir/file3 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 file12 >/dev/null 2>&1 ) &&\n     ( yes \"r\" | git mergetool submod ) &&\n     rmdir submod && mv submod-movedaside submod &&\n@@ -205,7 +209,7 @@ test_expect_success 'deleted vs modified submodule' '\n     git submodule update -N &&\n     test_must_fail git merge master &&\n     test -n \"$(git ls-files -u)\" &&\n-    ( yes \"\" | git mergetool file1 file2 subdir/file3 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 file12 >/dev/null 2>&1 ) &&\n     ( yes \"l\" | git mergetool submod ) &&\n     test ! -e submod &&\n@@ -218,7 +222,7 @@ test_expect_success 'deleted vs modified submodule' '\n     git submodule update -N &&\n     test_must_fail git merge test6 &&\n     test -n \"$(git ls-files -u)\" &&\n-    ( yes \"\" | git mergetool file1 file2 subdir/file3 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 file12 >/dev/null 2>&1 ) &&\n     ( yes \"r\" | git mergetool submod ) &&\n     test ! -e submod &&\n@@ -233,7 +237,7 @@ test_expect_success 'deleted vs modified submodule' '\n     git submodule update -N &&\n     test_must_fail git merge test6 &&\n     test -n \"$(git ls-files -u)\" &&\n-    ( yes \"\" | git mergetool file1 file2 subdir/file3 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 file12 >/dev/null 2>&1 ) &&\n     ( yes \"l\" | git mergetool submod ) &&\n     test \"$(cat submod/bar)\" = \"master submodule\" &&\n@@ -256,7 +260,7 @@ test_expect_success 'file vs modified submodule' '\n     git checkout -b test7.a branch1 &&\n     test_must_fail git merge master &&\n     test -n \"$(git ls-files -u)\" &&\n-    ( yes \"\" | git mergetool file1 file2 subdir/file3 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 file12 >/dev/null 2>&1 ) &&\n     ( yes \"r\" | git mergetool submod ) &&\n     rmdir submod && mv submod-movedaside submod &&\n@@ -271,7 +275,7 @@ test_expect_success 'file vs modified submodule' '\n     git checkout -b test7.b test7 &&\n     test_must_fail git merge master &&\n     test -n \"$(git ls-files -u)\" &&\n-    ( yes \"\" | git mergetool file1 file2 subdir/file3 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 file12 >/dev/null 2>&1 ) &&\n     ( yes \"l\" | git mergetool submod ) &&\n     git submodule update -N &&\n@@ -286,7 +290,7 @@ test_expect_success 'file vs modified submodule' '\n     git submodule update -N &&\n     test_must_fail git merge test7 &&\n     test -n \"$(git ls-files -u)\" &&\n-    ( yes \"\" | git mergetool file1 file2 subdir/file3 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 file12 >/dev/null 2>&1 ) &&\n     ( yes \"r\" | git mergetool submod ) &&\n     test -d submod.orig &&\n@@ -301,7 +305,7 @@ test_expect_success 'file vs modified submodule' '\n     git submodule update -N &&\n     test_must_fail git merge test7 &&\n     test -n \"$(git ls-files -u)\" &&\n-    ( yes \"\" | git mergetool file1 file2 subdir/file3 >/dev/null 2>&1 ) &&\n+    ( yes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 >/dev/null 2>&1 ) &&\n     ( yes \"d\" | git mergetool file11 file12 >/dev/null 2>&1 ) &&\n     ( yes \"l\" | git mergetool submod ) &&\n     test \"$(cat submod/bar)\" = \"master submodule\" &&\n-- \n1.7.4.4\n"},{"id":"170479","messageId":"7vaad9607h.fsf@alter.siamese.dyndns.org","threadId":"27681","inReplyTo":"734F376D-0CF5-4417-8DC2-8A46AA05D995@JonathonMah.com","subject":"Re: [PATCH 1/2] mergetool: Add tests for filename with whitespace","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-06-22T21:11:14Z","receivedAt":"2011-06-22T21:11:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathon Mah <me@JonathonMah.com> writes:\n\n> Signed-off-by: Jonathon Mah <me@JonathonMah.com>\n> ---\n\nMissing log message. What is the purpose of these new tests?\n\nYou found a bug in the current implementation of mergetool (and then fixed\nwith your next patch)? Your earlier unpublished attempts for your next\npatch did not work for paths with IFS in it, and you wanted to make sure\nthat future changes to your next patch will not be broken?\n"}]}