{"thread":{"id":"29029","subject":"[BUG] difftool falls back to normal diff when used during merge resolution","startedAt":"2011-11-27T18:09:14Z","lastAt":"2011-11-28T11:16:27Z","messageCount":2,"participants":["Jakub Turski","David Aguilar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"180023","messageId":"CAHWJSOSB768hWsNqrR559wef3-k_yZ=TjS_mxfj3TxXdgwm5iQ@mail.gmail.com","threadId":"29029","inReplyTo":null,"subject":"[BUG] difftool falls back to normal diff when used during merge resolution","fromName":"Jakub Turski","fromEmail":"yacoob@gmail.com","sentAt":"2011-11-27T18:09:14Z","receivedAt":"2011-11-27T18:09:14Z","isPatch":false,"sender":{"key":"yacoob@gmail.com","avatar":null},"body":"Hello there,\n\nJust found this behavior, and after a chat on IRC it looks to me like\nan actual bug. I have 'git difftool' configured to use vimdiff - and\nit worked fine. Despite that config, git still falls back to plain\ndiff when I launch difftool mid-way through merge conflict resolution.\n\nHere's a reproducable testcase (w/ version 1.7.7.3)\n\n$ mkdir a; cd a; git init; echo A>A; git add A; git commit -m A; git\nbranch alt; echo AA>A; git commit -am AA; git checkout alt; echo B>A;\ngit commit -m B; git commit -am B; git checkout master; git merge alt;\ngit difftool -t vimdiff A\n\nResults:\nhttp://pastie.org/2929336\n\nKT.\n"},{"id":"180042","messageId":"2814991420316381881@unknownmsgid","threadId":"29029","inReplyTo":"CAHWJSOSB768hWsNqrR559wef3-k_yZ=TjS_mxfj3TxXdgwm5iQ@mail.gmail.com","subject":"Re: [BUG] difftool falls back to normal diff when used during merge resolution","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2011-11-28T11:16:27Z","receivedAt":"2011-11-28T11:16:27Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Nov 27, 2011, at 10:09 AM, Jakub Turski <yacoob@gmail.com> wrote:\n\n> Hello there,\n>\n> Just found this behavior, and after a chat on IRC it looks to me like\n> an actual bug. I have 'git difftool' configured to use vimdiff - and\n> it worked fine. Despite that config, git still falls back to plain\n> diff when I launch difftool mid-way through merge conflict resolution.\n>\n> Here's a reproducable testcase (w/ version 1.7.7.3)\n>\n> $ mkdir a; cd a; git init; echo A>A; git add A; git commit -m A; git\n> branch alt; echo AA>A; git commit -am AA; git checkout alt; echo B>A;\n> git commit -m B; git commit -am B; git checkout master; git merge alt;\n> git difftool -t vimdiff A\n>\n> Results:\n> http://pastie.org/2929336\n\nI think this is an unfortunate case where the implementation leaks\ninto the user experience.\n\nI haven't checked, but I'm pretty sure this is because\nGIT_EXTERNAL_DIFF has no affect when the conflicts exist.\n\ngit mergetool can be used in this situation.\n\nWe could do a check up front in difftool to see whether conflicts\nexist and exit with an error message. The difftool script is quite\nsmall and basically a very thin wrapper around git diff, though, so I\ndo hesitate before making it more complicated.\n\nanyways, try \"git mergetool\".\n-- \n            David\n"}]}