* Question on rerere
@ 2006-12-19 23:53 Johannes Schindelin
2006-12-20 0:41 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2006-12-19 23:53 UTC (permalink / raw)
To: git
Hi,
while studying the code of rerere I found myself wondering if the code of
compute_conflict_name and record_preimage is correct.
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?
Ciao,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question on rerere
2006-12-19 23:53 Question on rerere Johannes Schindelin
@ 2006-12-20 0:41 ` Junio C Hamano
2006-12-20 1:29 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2006-12-20 0:41 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question on rerere
2006-12-20 0:41 ` Junio C Hamano
@ 2006-12-20 1:29 ` Junio C Hamano
2006-12-20 1:40 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2006-12-20 1:29 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Junio C Hamano <junkio@cox.net> writes:
> 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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question on rerere
2006-12-20 1:29 ` Junio C Hamano
@ 2006-12-20 1:40 ` Johannes Schindelin
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2006-12-20 1:40 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hi,
On Tue, 19 Dec 2006, Junio C Hamano wrote:
> Junio C Hamano <junkio@cox.net> writes:
>
> > 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?
Yes. Thanks!
Ciao,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-12-20 1:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-19 23:53 Question on rerere Johannes Schindelin
2006-12-20 0:41 ` Junio C Hamano
2006-12-20 1:29 ` Junio C Hamano
2006-12-20 1:40 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox