git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git mergetool vs stash apply

From
Alexander Gladysh <agladysh@gmail.com>
Date
May 20, 2008, 11:16 UTC
Message-ID
<c6c947f60805200416s61b0cc1eqd6d6c804abd15b4@mail.gmail.com>
In-Reply-To
<20080520090258.GB31703@sigill.intra.peff.net>
On Tue, May 20, 2008 at 1:02 PM, Jeff King <peff@peff.net> wrote:
Show 32 quoted lines
> On Tue, May 20, 2008 at 12:02:44PM +0400, Alexander Gladysh wrote:
>
>> The git mergetool ignores conflicts by git stash apply:
>>
>> $ git stash apply
>> Auto-merged path/file.ext
>> CONFLICT (content): Merge conflict in path/file.ext
>>
>> $ git mergetool
>> merge tool candidates: kdiff3 kdiff3 tkdiff xxdiff meld gvimdiff
>> opendiff emerge vimdiff
>> No files need merging
>>
>> While path/file.ext do contain merge conflict.
>
> I think there is something else going on, because it _does_ generally
> work. This simple test case should confirm:
>
>  mkdir repo && cd repo && git init
>  echo content >file && git add . && git commit -m one
>  echo changes >>file && git commit -a -m two
>  echo more >>file && git stash
>  git checkout -b other HEAD^
>  echo different changes >>file && git commit -a -m three
>  git stash apply
>  git mergetool
>
> I get:
>  Normal merge conflict for 'file':
>    {local}: modified
>    {remote}: modified
>  Hit return to start merge resolution tool (xxdiff):

Yes, I get the that output on clean repo. And I get that output also if I use actual conflict data (that is, three snapshots of conflicted file) instead.

> So there is perhaps something specific about your setup or your conflict
> that is causing mergetool not to work as expected.
Most likely so.
> Can you give us a test case that fails?

No, unfortunately I can not. I was unable to produce a minimal test case, and I can not share the whole repo.

Alexander.
Previous: Jeff KingNext: Jakub Narebski
Message 3 of 6 in “git mergetool vs stash apply”
  1. Alexander GladyshMay 20, 2008
  2. Jeff KingMay 20, 2008
  3. Alexander GladyshMay 20, 2008
  4. Jakub NarebskiMay 20, 2008
  5. Alexander GladyshMay 20, 2008
  6. Jeff KingMay 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.