Re: Git union issue

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

 



On 2020-07-30 at 18:29:10, Bram Huenaerts wrote:
> Goodafternoon,
> 
> while trying to reduce conflicts on a changelog file, i tried
> eliminating conflicts using the .gitattributes with union defined for
> the CHANGELOG_UPCOMING.md file. I included the steps to come to this
> very strange issue. In the enclosed PDF, I tried to specify all the
> commands so it is easy to reproduce this strange issue which I hope is
> not a works as designed.

In general, folks on this list much prefer it if you include your text
in the body of the message as plain text instead of using PDFs.  You may
get more responses in the future if you include the text inline, since
folks will be more likely to read your message.  (I was personally
surprised to see the list accepted PDFs; I did not think it would.)

I'm not an expert on the merge machinery and especially not on the union
algorithm, but I believe what you're seeing here is due to using a
merge-based rebase.  In this case, your rebase is removing lines a and b
on one side, but the other side has y, a, and b.  Instead of a conflict,
you're getting the union: y, a, and b.  If you have an empty set of
feature lines on one side, and a set with some items on the other, then
the union is the latter set.

I agree this is not especially useful and probably not what you wanted.
The documentation does state, "Do not use this if you do not understand
the implications," implying that it's tricky to understand, so I'm not
surprised that it's confusing or has unexpected behavior.

Of course, someone with more familiarity with the merge machinery or
this option may have a better explanation for this than I do, or
possibly a patch if I've misunderstood and this option is broken.
Hopefully some such person will chime in.
-- 
brian m. carlson: Houston, Texas, US

Attachment: signature.asc
Description: PGP signature


[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]

  Powered by Linux