Re: [PATCH 2/2] Documentation on git-checkout --ours/--theirs improved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simon Eugster <simon.eu@xxxxxxxxx> writes:

> 2015-06-15 22:10 GMT+02:00 Junio C Hamano <gitster@xxxxxxxxx>:
>>
>> "Simon A. Eugster" <simon.eu@xxxxxxxxx> writes:
>>
>> > ---
>>
>> - Lack of explanation as to why this is a good thing.
>> - Lack of sign-off.
>>
>> Why is there still 1/2, if its effect is wholly annulled by a
>> subsequent step 2/2?
>
>
> Sorry for that, still trying to find out how git send-email works.

I do not think "git send-email" is involved in that process in any
way.  The problem is you made the updates on top of the previous
one, without squashing.  You fed two commits, instead of a squashed
one commit, to "git send-email", and the command obliged and sent
them out.

>> > +During merging, we assume the role of the canonical history’s keeper,
>> > +which, in case of a rebase, is the remote history, and our private commits
>> > +look to the keeper as “their” commits which need to be integrated on top
>> > +of “our” work.
>> > ++
>> > +Normal merging:
>> > +------------
>> > +local ---------abC                  <-- canonical history
>> > +                 | git checkout --ours
>> > +                 v
>> > +MERGE ---------abC
>> > +                 ^
>> > +                 | git checkout --theirs
>> > +origin/master ---Xyz
>> > +------------
>> > +Rebasing:
>> > +------------
>> > +local -----------Abc
>> > +                 | git checkout --theirs
>> > +                 v
>> > +REBASE --------xyZ
>> > +                 ^
>> > +                 | git checkout --ours
>> > +origin/master -xyZ                    <-- canonical history
>> > +------------
>>
>> I can see that an arrow with "canonical history" points at different
>> things between the two pictures, but other than that, I am not sure
>> what these are trying to illustrate.  Especially between abc and
>> xyz, why does the former choose abc while the latter choooses xyz?
>> Are these pictures meant to show what happens when the user says
>> "checkout --ours" during a conflicted integration (whether it is a
>> merge or a rebase)?
>
> I tried to create a picture which shows the difference of ours and
> theirs when merging vs. rebasing, but apparently it did not turn out
> well, and I will just leave it away.

I'll wait for several days to see what other people would say, if
they care to comment on this.  Maybe they can come up with a more
intuitive picture, or maybe they say textual description is
sufficiently clear that we do not need an illustration.  I dunno.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]