Re: Our merge bases sometimes suck

2014-06-23 Thread Jakub Narębski
W dniu 2014-06-20 23:17, Nico Williams pisze: On Fri, Jun 20, 2014 at 1:53 AM, Junio C Hamano wrote: Michael Haggerty writes: [...] Hmph, but that obviously will become very expensive to compute as project grows. That's the main reason to like Fossil's approach (namely, the use of SQL, sp

Re: Our merge bases sometimes suck

2014-06-20 Thread Nico Williams
On Fri, Jun 20, 2014 at 1:53 AM, Junio C Hamano wrote: > Michael Haggerty writes: >> [...] > > Hmph, but that obviously will become very expensive to compute as > project grows. That's the main reason to like Fossil's approach (namely, the use of SQL, specifically SQLite3): you can write declara

Re: Our merge bases sometimes suck

2014-06-20 Thread Michael Haggerty
On 06/20/2014 08:53 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> It just looks asymmetric, but actually it is symmetric, which was kindof >> surprising when I realized it >> >> Since "|branch ∧ master|" is the same for all candidates, minimizing N >> is the same as maximizing |ca

Re: Our merge bases sometimes suck

2014-06-19 Thread Junio C Hamano
Michael Haggerty writes: > It just looks asymmetric, but actually it is symmetric, which was kindof > surprising when I realized it > > Since "|branch ∧ master|" is the same for all candidates, minimizing N > is the same as maximizing |candidate|, which is the same as > > git rev-list --c

Re: Our merge bases sometimes suck

2014-06-17 Thread Michael Haggerty
On 06/17/2014 05:08 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> The "best" merge base >> = >> >> But not all merge bases are created equal. It is possible to define a >> "best" merge base that has some nice properties. >> >> Let's focus on the command >> >>

Re: Our merge bases sometimes suck

2014-06-17 Thread Junio C Hamano
Michael Haggerty writes: > The "best" merge base > = > > But not all merge bases are created equal. It is possible to define a > "best" merge base that has some nice properties. > > Let's focus on the command > > git diff $master...$branch > > which is equivalent to > >

Re: Our merge bases sometimes suck

2014-06-13 Thread Junio C Hamano
Jakub Narębski writes: > I don't know if it has been fixed, but there is a difference > between "git diff A...B" when A and B have one merge base, and > "git diff A...B" when there are more than one merge base. > > When there is one merge base, "git diff A...B" returns simple > unified diff equiv

Re: Our merge bases sometimes suck

2014-06-13 Thread Michael Haggerty
On 06/13/2014 05:52 PM, Jakub Narębski wrote: > I don't know if it has been fixed, but there is a difference > between "git diff A...B" when A and B have one merge base, and > "git diff A...B" when there are more than one merge base. > > When there is one merge base, "git diff A...B" returns simpl

Re: Our merge bases sometimes suck

2014-06-13 Thread Jakub Narębski
W dniu 2014-06-13 11:38, Michael J Gruber pisze: Michael Haggerty venit, vidit, dixit 13.06.2014 00:12: I've been thinking a lot about merge bases lately and think I have discovered something interesting. tl;dr: When two branches have multiple merge bases, git merge-base $master $branch

Re: Our merge bases sometimes suck

2014-06-13 Thread Michael Haggerty
On 06/13/2014 11:38 AM, Michael J Gruber wrote: > Michael Haggerty venit, vidit, dixit 13.06.2014 00:12: >> I've been thinking a lot about merge bases lately and think I have >> discovered something interesting. >> >> tl;dr: >> >> When two branches have multiple merge bases, >> >> git merge-bas

Re: Our merge bases sometimes suck

2014-06-13 Thread Michael J Gruber
Michael Haggerty venit, vidit, dixit 13.06.2014 00:12: > I've been thinking a lot about merge bases lately and think I have > discovered something interesting. > > tl;dr: > > When two branches have multiple merge bases, > > git merge-base $master $branch > > picks one merge base more or les

Our merge bases sometimes suck

2014-06-12 Thread Michael Haggerty
I've been thinking a lot about merge bases lately and think I have discovered something interesting. tl;dr: When two branches have multiple merge bases, git merge-base $master $branch picks one merge base more or less arbitrarily. Here I describe a criterion for picking a "best" merge base