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

Re: Collaborative conflict resolution feature request

From
SMStefan Moch <stefanmoch@mail.de>
Date
Jun 16, 2020, 17:17 UTC
Message-ID
<fe2cd745-29a7-3341-d321-4199b184bc96@mail.de>
In-Reply-To
<39c45b18-194c-0ff1-4a6d-1db8dee788c7@iee.email>
Philip Oakley wrote:
Show 36 quoted lines
> On 15/06/2020 10:51, Sergey Organov wrote:
>> Philip Oakley <philipoakley@iee.email> writes:
>>
>>
>> [...]
>>
>>> Also look at 'rerere'.
>> 'rerere' is a superb feature, but isn't it local? If so, how could it
>> help for collaboration? What's the idea? Is there a way to share
>> 'rerere'?
> I saw this (rerere) is two parts. First was to ensure Eric was aware of
> it as a possible capability for use by the 'merge manager', and others,
> so that they didn't loose sight of their conflict resolutions for the
> time when the 'big merge window' came around. E.g. So a dev could do a
> local fix based on their rerere database and then send a patch to the
> merge manager indication their approach to the resolution.
>
> Meanwhile, second, at the moment the rerere database is 'local', mainly,
> as I understand it because of the number of context lines a local user
> has chosen (hence not immediately portable).
>
> I personally believe that it should be possible to some how exchange
> resolutions without that pre-optimisation of the context line choice. I
> had a look back at the old rerere script and that had small fingerprints
> of each resolution stored in the database (at least as I read it).
> However when I look at the modern rerere database it looks like it has
> full pre & post images, rather than just the conflicts, so I'm not yet
> sure what's really happening (i.e. I haven't dived into the c code).
>
> A possibly more sensible approach (to exchanging resolutions) is simply
> to do the merge, without commit, then save that merge as if it's a
> single side commit (with the other merge parent listed in the commit
> message), and that commit can then be pushed/pulled etc and a variant of
> `rerere train` can be used to recreate the local database. In a sense
> the fake merge (why not a proper merge) is a variant of a stash where
> you aren't wanting to pollute the branch trees with this extra 'flotsam'.

There is a `contrib/rerere-train.sh` script in git's repository, that can recreate rerere resolutions from existing merge commits.

Extending the options Eric outlined, a collaborative conflict resolution workflow might thus be:

  * developers do test merges on temporary branches between their
    feature branch and the main development – or other feature
    branches if necessary (maybe create test merges on a regular
    basis to minimize the new conflicts)
  * these temporary branches get pushed, but not merged to other
    branches
  * the branch manager fetches these branches and uses
    `rerere-train.sh` to fill the local rerere database with
    conflict resolutions from the test merges
  * the temporary branches get deleted
  * the recorded resolutions get reused when needed (keep in mind
    rerere's gc config, see gc.rerereResolved and gc.rerereUnresolved)
The last discussion on rerere-train.sh on this list was here:
https://lore.kernel.org/git/BZAQIE4YND2I.Z7BFCW7BLH3K@penguin/
Previous: Philip OakleyNext: Curtin, Eric
Message 9 of 32 in “Collaborative conflict resolution feature request”
  1. Curtin, EricJun 12, 2020
  2. Johannes SixtJun 13, 2020
  3. Christian CouderJun 13, 2020
  4. Curtin, EricJun 13, 2020
  5. Philip OakleyJun 13, 2020
  6. Junio C HamanoJun 13, 2020
  7. Sergey OrganovJun 15, 2020
  8. Philip OakleyJun 15, 2020
  9. Stefan MochJun 16, 2020
  10. Curtin, EricJun 17, 2020
  11. Sergey OrganovJun 17, 2020
  12. Christian CouderJun 13, 2020
  13. Junio C HamanoJun 13, 2020
  14. Junio C HamanoJun 13, 2020
  15. Philip OakleyJun 14, 2020
  16. Konstantin TokarevJun 14, 2020
  17. Curtin, EricJun 15, 2020
  18. Philip OakleyJun 15, 2020
  19. Junio C HamanoJun 15, 2020
  20. Chris TorekJun 15, 2020
  21. Chris TorekJun 16, 2020
  22. Philip OakleyJun 15, 2020
  23. Junio C HamanoJun 17, 2020
  24. demerphqJun 18, 2020
  25. Curtin, EricJun 18, 2020
  26. Curtin, EricJun 18, 2020
  27. demerphqJun 18, 2020
  28. Curtin, EricJun 19, 2020
  29. Christian CouderJun 20, 2020
  30. Curtin, EricJun 21, 2020
  31. Christian CouderJun 16, 2020
  32. Sergey OrganovJun 15, 2020

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.