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

Re: Question on rerere

From
Junio C Hamano <junkio@cox.net>
Date
Dec 20, 2006, 01:29 UTC
Message-ID
<7vy7p3mk1i.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vk60no0ua.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 12 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>> IIUC then each conflict hunk is handled _separately_ like this: the 
>> lexicographically smaller between the two file sections is displayed 
>> first, regardless if a previous hunk had a different order. Not that it 
>> matters most of the time, but isn't this dangerous?
>
> You are probably right.  Probably the right thing would be to
> use the first hunk to determine the flipping order and stick to
> that for the rest.
>
> Not that I've seen problems with the current behaviour, though.

Well, come to think of it, I think the current behaviour makes more sense.

Suppose you start from an original file "OO". You have two branches that change it to "AO" and "BO", and another pair of branches that change it to "OC" and "OD". Let's call these branches A, B, C, and D.

By merging A and C, you will get "AC"; you can get "AD", "BC" and "BD" the same way.

Now suppose you are on "AC" and merged "BD". You would get "<A=B><C=D>".

If you were on "BD" and merged "AC" you would get "<B=A><D=C>". If you were on "AD" and merged "BC" you would get "<A=B><D=C>".

You got the idea?
Previous: Junio C HamanoNext: Johannes Schindelin
Message 3 of 4 in “Question on rerere”
  1. Johannes SchindelinDec 19, 2006
  2. Junio C HamanoDec 20, 2006
  3. Junio C HamanoDec 20, 2006
  4. Johannes SchindelinDec 20, 2006

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.