git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Bram Huenaerts <bramhuenaerts@me.com>
Cc: git@vger.kernel.org
Subject: Re: Git union issue
Date: Fri, 31 Jul 2020 01:05:41 +0000	[thread overview]
Message-ID: <20200731010541.GI6540@camp.crustytoothpaste.net> (raw)
In-Reply-To: <A7C11212-1ECB-4D8D-B3B1-C7DB6673F3E6@me.com>

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

  reply	other threads:[~2020-07-31  1:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 18:29 Git union issue Bram Huenaerts
2020-07-31  1:05 ` brian m. carlson [this message]
2020-07-31  2:12   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200731010541.GI6540@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=bramhuenaerts@me.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).