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

Re: Sharing merge conflict resolution between multiple developers

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 12, 2014, 01:57 UTC
Message-ID
<CAPc5daW1A9OVSBPe-br-x9OeQPqj816NgMKztWMyp6gN==ojHw@mail.gmail.com>
In-Reply-To
<CAFOYHZAaF+Dve1DwUUd-k6Nh3+nOZzNVUQAD0quN4crRAjfCLQ@mail.gmail.com>
On Mon, Aug 11, 2014 at 4:29 PM, Chris Packham <judge.packham@gmail.com> wrote:
Show 16 quoted lines
>> So, the "recording" phase may go something like this:
>> ...
>>     git checkout merge-fix/$this-$that
>>     git read-tree -m -u HEAD $this
>>     git commit -a -m 'merge-fix/$this-$that postimage'
>>
>> The rough idea is "git show merge-fix/$this-$that" will show the
>> "patch" you can apply on top of the conflicted state other people
>> would get by running "git merge $that" while on "$this" branch.
>
> So how would someone else pickup that postimage and use it?
>
>   git checkout $this
>   git merge $that
>   git fetch $remote ':/merge-fix/$this-$that postimage'
>   git show ':/merge-fix/$this-$that postimage' | git apply (or patch -p1)

For a simpler case that would work, but because we are not saving just a patch but two full trees to compare (i.e. merge-fix/$this-$that is the postimage, its ^1 is the preimage), you should be able to use the three-way merge in a similar way cherry-pick works. In fact, that is how rerere replays the recorded resolution, not with a "patch -p1".

Previous: Chris PackhamNext: Nico Williams
Message 4 of 10 in “Sharing merge conflict resolution between multiple developers”
  1. Chris PackhamAug 11, 2014
  2. Junio C HamanoAug 11, 2014
  3. Chris PackhamAug 11, 2014
  4. Junio C HamanoAug 12, 2014
  5. Nico WilliamsAug 11, 2014
  6. Jeff KingAug 17, 2014
  7. Signinig a commit with multiple signaturesJason Pyeron, Aug 17, 2014
  8. Jeff KingAug 19, 2014
  9. Jason PyeronAug 19, 2014
  10. Christian CouderAug 11, 2014

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.