{"thread":{"id":"44590","subject":"Error after calling git difftool -d with","startedAt":"2016-12-02T12:15:56Z","lastAt":"2016-12-09T09:47:46Z","messageCount":6,"participants":["P. Duijst","Johannes Schindelin","David Aguilar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"306792","messageId":"5f630c90-cf54-3a23-c9a9-af035d4514e0@gmail.com","threadId":"44590","inReplyTo":null,"subject":"Error after calling git difftool -d with","fromName":"P. Duijst","fromEmail":"p.duijst@gmail.com","sentAt":"2016-12-02T12:15:39Z","receivedAt":"2016-12-02T12:15:56Z","isPatch":false,"sender":{"key":"p.duijst@gmail.com","avatar":null},"body":"Dear,\n\nIncase filenames are used with a quote ' or a bracket [  (and maybe some \nmore characters), git \"diff\" and \"difftool -y\" works fine, but git \n*difftool **-d* gives the next error message:\n\n    peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n    $ git diff\n    diff --git a/Test ''inch.txt b/Test ''inch.txt\n    index dbff793..41f3257 100644\n    --- a/Test ''inch.txt\n    +++ b/Test ''inch.txt\n    @@ -1 +1,3 @@\n    +\n    +ddd\n      Test error in simple repository\n    warning: LF will be replaced by CRLF in Test ''inch.txt.\n    The file will have its original line endings in your working directory.\n\n    peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n    *$ git difftool -d*\n    *fatal: Cannot open '/d/Dev/test//Test ''inch.txt': No such file or\n    directory*\n    *hash-object /d/Dev/test//Test ''inch.txt: command returned error: 128*\n\n    peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n    $\n\n\nThis issue is inside V2.10.x and V2.11.0.\nV2.9.0 is working correctly...\n\nI am using git for windows and beyond compare 4.0 as difftool.\n\nBest regards,\n\nPeter\n"},{"id":"306795","messageId":"alpine.DEB.2.20.1612021704170.117539@virtualbox","threadId":"44590","inReplyTo":"5f630c90-cf54-3a23-c9a9-af035d4514e0@gmail.com","subject":"Re: Error after calling git difftool -d with","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-12-02T16:05:06Z","receivedAt":"2016-12-02T16:07:05Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peter,\n\nOn Fri, 2 Dec 2016, P. Duijst wrote:\n\n> Incase filenames are used with a quote ' or a bracket [  (and maybe some more\n> characters), git \"diff\" and \"difftool -y\" works fine, but git *difftool **-d*\n> gives the next error message:\n> \n>    peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n>    $ git diff\n>    diff --git a/Test ''inch.txt b/Test ''inch.txt\n>    index dbff793..41f3257 100644\n>    --- a/Test ''inch.txt\n>    +++ b/Test ''inch.txt\n>    @@ -1 +1,3 @@\n>    +\n>    +ddd\n>      Test error in simple repository\n>    warning: LF will be replaced by CRLF in Test ''inch.txt.\n>    The file will have its original line endings in your working directory.\n> \n>    peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n>    *$ git difftool -d*\n>    *fatal: Cannot open '/d/Dev/test//Test ''inch.txt': No such file or\n>    directory*\n>    *hash-object /d/Dev/test//Test ''inch.txt: command returned error: 128*\n> \n>    peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n>    $\n> \n> \n> This issue is inside V2.10.x and V2.11.0.\n> V2.9.0 is working correctly...\n\nYou say v2.11.0, but did you also try the new, experimental builtin\ndifftool? You can test without reinstalling:\n\n\tgit -c difftool.useBuiltin=true difftool -d ...\n\nCiao,\nJohannes\n"},{"id":"306908","messageId":"20161205051510.itftw4hyzkv6nnxn@gmail.com","threadId":"44590","inReplyTo":"alpine.DEB.2.20.1612021704170.117539@virtualbox","subject":"Re: Error after calling git difftool -d with","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2016-12-05T05:15:10Z","receivedAt":"2016-12-05T05:15:21Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Fri, Dec 02, 2016 at 05:05:06PM +0100, Johannes Schindelin wrote:\n> Hi Peter,\n> \n> On Fri, 2 Dec 2016, P. Duijst wrote:\n> \n> > Incase filenames are used with a quote ' or a bracket [  (and maybe some more\n> > characters), git \"diff\" and \"difftool -y\" works fine, but git *difftool **-d*\n> > gives the next error message:\n> > \n> >    peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n> >    $ git diff\n> >    diff --git a/Test ''inch.txt b/Test ''inch.txt\n> >    index dbff793..41f3257 100644\n> >    --- a/Test ''inch.txt\n> >    +++ b/Test ''inch.txt\n> >    @@ -1 +1,3 @@\n> >    +\n> >    +ddd\n> >      Test error in simple repository\n> >    warning: LF will be replaced by CRLF in Test ''inch.txt.\n> >    The file will have its original line endings in your working directory.\n> > \n> >    peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n> >    *$ git difftool -d*\n> >    *fatal: Cannot open '/d/Dev/test//Test ''inch.txt': No such file or\n> >    directory*\n> >    *hash-object /d/Dev/test//Test ''inch.txt: command returned error: 128*\n> > \n> >    peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n> >    $\n> > \n> > \n> > This issue is inside V2.10.x and V2.11.0.\n> > V2.9.0 is working correctly...\n> \n> You say v2.11.0, but did you also try the new, experimental builtin\n> difftool? You can test without reinstalling:\n> \n> \tgit -c difftool.useBuiltin=true difftool -d ...\n\nFWIW, I verified that this problem does not manifest itself on\nLinux, using the current scripted difftool.\n\nPeter, what actual diff tool are you using?\n\nSince these filenames work fine with \"difftool -d\" on Linux, it\nsuggests that this is either a tool-specific issue, or an issue\nrelated to unix-to-windows path translation.\n-- \nDavid\n"},{"id":"306921","messageId":"c0c8c333-adfa-ad58-f1ec-7239a3a16528@gmail.com","threadId":"44590","inReplyTo":"20161205051510.itftw4hyzkv6nnxn@gmail.com","subject":"Re: Error after calling git difftool -d with","fromName":"P. Duijst","fromEmail":"p.duijst@gmail.com","sentAt":"2016-12-05T07:58:00Z","receivedAt":"2016-12-05T07:58:10Z","isPatch":false,"sender":{"key":"p.duijst@gmail.com","avatar":null},"body":"On 12/5/2016 06:15, David Aguilar wrote:\n> On Fri, Dec 02, 2016 at 05:05:06PM +0100, Johannes Schindelin wrote:\n>> Hi Peter,\n>>\n>> On Fri, 2 Dec 2016, P. Duijst wrote:\n>>\n>>> Incase filenames are used with a quote ' or a bracket [  (and maybe some more\n>>> characters), git \"diff\" and \"difftool -y\" works fine, but git *difftool **-d*\n>>> gives the next error message:\n>>>\n>>>     peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n>>>     $ git diff\n>>>     diff --git a/Test ''inch.txt b/Test ''inch.txt\n>>>     index dbff793..41f3257 100644\n>>>     --- a/Test ''inch.txt\n>>>     +++ b/Test ''inch.txt\n>>>     @@ -1 +1,3 @@\n>>>     +\n>>>     +ddd\n>>>       Test error in simple repository\n>>>     warning: LF will be replaced by CRLF in Test ''inch.txt.\n>>>     The file will have its original line endings in your working directory.\n>>>\n>>>     peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n>>>     *$ git difftool -d*\n>>>     *fatal: Cannot open '/d/Dev/test//Test ''inch.txt': No such file or\n>>>     directory*\n>>>     *hash-object /d/Dev/test//Test ''inch.txt: command returned error: 128*\n>>>\n>>>     peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n>>>     $\n>>>\n>>>\n>>> This issue is inside V2.10.x and V2.11.0.\n>>> V2.9.0 is working correctly...\n>> You say v2.11.0, but did you also try the new, experimental builtin\n>> difftool? You can test without reinstalling:\n>>\n>> \tgit -c difftool.useBuiltin=true difftool -d ...\n> FWIW, I verified that this problem does not manifest itself on\n> Linux, using the current scripted difftool.\n>\n> Peter, what actual diff tool are you using?\n>\n> Since these filenames work fine with \"difftool -d\" on Linux, it\n> suggests that this is either a tool-specific issue, or an issue\n> related to unix-to-windows path translation.\nHi all,\n\n@Johannes: \"git -c difftool.useBuiltin=true difftool -d\" works OK :-), \nbeyond compare is launching with the diff's displayed\n@David: I am using Beyond Compare V4.1.9\n\nBest regards,\n\nPeter\n\n"},{"id":"306925","messageId":"alpine.DEB.2.20.1612051142550.117539@virtualbox","threadId":"44590","inReplyTo":"c0c8c333-adfa-ad58-f1ec-7239a3a16528@gmail.com","subject":"Re: Error after calling git difftool -d with","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-12-05T10:56:31Z","receivedAt":"2016-12-05T10:57:10Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peter,\n\nOn Mon, 5 Dec 2016, P. Duijst wrote:\n\n> On 12/5/2016 06:15, David Aguilar wrote:\n> > On Fri, Dec 02, 2016 at 05:05:06PM +0100, Johannes Schindelin wrote:\n> > >\n> > > On Fri, 2 Dec 2016, P. Duijst wrote:\n> > >\n> > > > Incase filenames are used with a quote ' or a bracket [  (and\n> > > > maybe some more characters), git \"diff\" and \"difftool -y\" works\n> > > > fine, but git *difftool **-d* gives the next error message:\n> > > >\n> > > >     peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n> > > >     $ git diff\n> > > >     diff --git a/Test ''inch.txt b/Test ''inch.txt\n> > > >     index dbff793..41f3257 100644\n> > > >     --- a/Test ''inch.txt\n> > > >     +++ b/Test ''inch.txt\n> > > >     @@ -1 +1,3 @@\n> > > >     +\n> > > >     +ddd\n> > > >       Test error in simple repository\n> > > >     warning: LF will be replaced by CRLF in Test ''inch.txt.\n> > > >     The file will have its original line endings in your working\n> > > >     directory.\n> > > >\n> > > >     peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n> > > >     *$ git difftool -d*\n> > > >     *fatal: Cannot open '/d/Dev/test//Test ''inch.txt': No such file or\n> > > >     directory*\n> > > >     *hash-object /d/Dev/test//Test ''inch.txt: command returned error:\n> > > >     128*\n> > > >\n> > > >     peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n> > > >     $\n> > > >\n> > > >\n> > > > This issue is inside V2.10.x and V2.11.0.\n> > > > V2.9.0 is working correctly...\n> > > You say v2.11.0, but did you also try the new, experimental builtin\n> > > difftool? You can test without reinstalling:\n> > >\n> > >  git -c difftool.useBuiltin=true difftool -d ...\n> >\n> > FWIW, I verified that this problem does not manifest itself on Linux,\n> > using the current scripted difftool.\n> >\n> > Peter, what actual diff tool are you using?\n> >\n> > Since these filenames work fine with \"difftool -d\" on Linux, it\n> > suggests that this is either a tool-specific issue, or an issue\n> > related to unix-to-windows path translation.\n> \n> @Johannes: \"git -c difftool.useBuiltin=true difftool -d\" works OK :-), beyond\n> compare is launching with the diff's displayed\n\nPerfect.\n\nIn that case, I think it is not worth fixing the scripted tool but focus\non getting rid of it in favor of the builtin version.\n\nIt's not like it is the only problem with having difftool implemented\nas a script...\n\nCiao,\nJohannes\n"},{"id":"307336","messageId":"20161209094733.f2ism4snbrsbe2nw@gmail.com","threadId":"44590","inReplyTo":"alpine.DEB.2.20.1612051142550.117539@virtualbox","subject":"Re: Error after calling git difftool -d with","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2016-12-09T09:47:33Z","receivedAt":"2016-12-09T09:47:46Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Mon, Dec 05, 2016 at 11:56:31AM +0100, Johannes Schindelin wrote:\n> Hi Peter,\n> \n> On Mon, 5 Dec 2016, P. Duijst wrote:\n> \n> > On 12/5/2016 06:15, David Aguilar wrote:\n> > > On Fri, Dec 02, 2016 at 05:05:06PM +0100, Johannes Schindelin wrote:\n> > > >\n> > > > On Fri, 2 Dec 2016, P. Duijst wrote:\n> > > >\n> > > > > Incase filenames are used with a quote ' or a bracket [  (and\n> > > > > maybe some more characters), git \"diff\" and \"difftool -y\" works\n> > > > > fine, but git *difftool **-d* gives the next error message:\n> > > > >\n> > > > >     peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n> > > > >     $ git diff\n> > > > >     diff --git a/Test ''inch.txt b/Test ''inch.txt\n> > > > >     index dbff793..41f3257 100644\n> > > > >     --- a/Test ''inch.txt\n> > > > >     +++ b/Test ''inch.txt\n> > > > >     @@ -1 +1,3 @@\n> > > > >     +\n> > > > >     +ddd\n> > > > >       Test error in simple repository\n> > > > >     warning: LF will be replaced by CRLF in Test ''inch.txt.\n> > > > >     The file will have its original line endings in your working\n> > > > >     directory.\n> > > > >\n> > > > >     peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n> > > > >     *$ git difftool -d*\n> > > > >     *fatal: Cannot open '/d/Dev/test//Test ''inch.txt': No such file or\n> > > > >     directory*\n> > > > >     *hash-object /d/Dev/test//Test ''inch.txt: command returned error:\n> > > > >     128*\n> > > > >\n> > > > >     peter@scm_ws_10 MINGW64 /d/Dev/test (master)\n> > > > >     $\n> > > > >\n> > > > >\n> > > > > This issue is inside V2.10.x and V2.11.0.\n> > > > > V2.9.0 is working correctly...\n> > > > You say v2.11.0, but did you also try the new, experimental builtin\n> > > > difftool? You can test without reinstalling:\n> > > >\n> > > >  git -c difftool.useBuiltin=true difftool -d ...\n> > >\n> > > FWIW, I verified that this problem does not manifest itself on Linux,\n> > > using the current scripted difftool.\n> > >\n> > > Peter, what actual diff tool are you using?\n> > >\n> > > Since these filenames work fine with \"difftool -d\" on Linux, it\n> > > suggests that this is either a tool-specific issue, or an issue\n> > > related to unix-to-windows path translation.\n> > \n> > @Johannes: \"git -c difftool.useBuiltin=true difftool -d\" works OK :-), beyond\n> > compare is launching with the diff's displayed\n> \n> Perfect.\n> \n> In that case, I think it is not worth fixing the scripted tool but focus\n> on getting rid of it in favor of the builtin version.\n> \n> It's not like it is the only problem with having difftool implemented\n> as a script...\n\nI just sent some patches[1] that makes it so that difftool always\noperates from the top-level of the repo, particularly when\ncalling hash-object.  They also eliminate using paths with\nembedded \"//\" in them, both of which may have caused this issue\n\nThough we can side-step this specific issue with the new builtin\ndifftool, if our use of hash-object with double-slashed absolute\npaths was not the problem reported above, then another\npossibility is that there's a problem in the Git.pm Perl module,\nwhich affects more than just difftool.\n\nI'm curious to understand the root cause of the problem.\n\nDoes Git.pm go through a shell on Windows?\n\nWhy was hash-object complaining about the correct path,\nbut reported that it didn't exist?\nDid having \"//\" in the path cause the problem?\n\nEnlightenment from the GFW internals perspective is much\nappreciated.\n\nSince this reportedly worked in older versions, I'm led to\nbelieve that 32b8c581ec (difftool: use Git::* functions instead\nof passing around state), which first introduced the use of\npaths with embedded \"//\", was the root cause.  If this is true\nthen the patches should fix the scripted difftool on Windows.\n\n[1] http://public-inbox.org/git/20161209085848.10929-1-davvid@gmail.com/T/#t\n\ncheers,\n-- \nDavid\n"}]}