Re: [RFC/PATCH 7/7] rerere: teach rerere to handle nested conflicts
- From
Thomas Gummerer <t.gummerer@gmail.com>
- Date
- May 24, 2018, 19:07 UTC
- Message-ID
- <20180524190724.GC18193@hank.intra.tgummerer.com>
- In-Reply-To
- <xmqqefi1qrpj.fsf@gitster-ct.c.googlers.com>
On 05/24, Junio C Hamano wrote:
Show 9 quoted lines
> Thomas Gummerer <t.gummerer@gmail.com> writes: > > > No automated test for this yet. As mentioned in the cover letter as > > well, I'm not sure if this is common enough for us to actually > > consider this use case. I don't know how nested conflicts could > > actually be created apart from committing a file with conflict > > markers, > > Recursive merge whose inner merge leaves conflict markers?
Thanks, lots of stuff in Git I still have to learn :)
Show 32 quoted lines
> One thing that makes me wonder is that the conflict markers may not > "nest" so nicely. For example, if inner merges had two conflicts > like these: > > <<< > <<<<< > A > ===== > B > >>>>> > === > <<<<< > A > ===== > C > >>>>> > >>> > > where one side made something to A or B, while the other side made > something (or something else) to A or C, I would imagine that the > outer conflict could be "optimized" to produce this instead: > > > <<<<< > A > ===== > <<< > B > === > C > >>> > >>>>>
Yeah, I do think that would be a nicer merge conflict to solve. But I think that should be done in a separate patch series if we decide to do so. When this one lands rerere will be able to handle the conflict either way :)