git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git union issue
@ 2020-07-30 18:29 Bram Huenaerts
  2020-07-31  1:05 ` brian m. carlson
  0 siblings, 1 reply; 3+ messages in thread
From: Bram Huenaerts @ 2020-07-30 18:29 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

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 case still something not clear. I’m happy to assist.


[-- Attachment #2: git-union-issue.pdf --]
[-- Type: application/pdf, Size: 56068 bytes --]

[-- Attachment #3: Type: text/plain, Size: 31 bytes --]



Kind regards,

Bram Huenaerts

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Git union issue
  2020-07-30 18:29 Git union issue Bram Huenaerts
@ 2020-07-31  1:05 ` brian m. carlson
  2020-07-31  2:12   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: brian m. carlson @ 2020-07-31  1:05 UTC (permalink / raw)
  To: Bram Huenaerts; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1846 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Git union issue
  2020-07-31  1:05 ` brian m. carlson
@ 2020-07-31  2:12   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2020-07-31  2:12 UTC (permalink / raw)
  To: brian m. carlson; +Cc: Bram Huenaerts, git

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> 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 am surprised too, and immediately after I saw *.pdf attachment, I
discarded the message to the trash, thinking it is a phishing attempt
or something similar.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-31  2:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 18:29 Git union issue Bram Huenaerts
2020-07-31  1:05 ` brian m. carlson
2020-07-31  2:12   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).