All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Leonard <dleonard.dev@gmail.com>
To: pauli@indel.ch
Cc: git@vger.kernel.org
Subject: Re: subtree split includes unrelated commits
Date: Fri, 25 Jun 2021 09:58:04 +0900	[thread overview]
Message-ID: <CADdMKP8kY-ry4ZWmp1hLCne328cC4thgavbkXOjdaNpD_ockSg@mail.gmail.com> (raw)

I hope I got this reply sent to the right thread.

> I found the issue to be related with the following change in git-subtree.sh:

> > Revision: 933cfeb90b5d03b4096db6d60494a6eedea25d03
> > Author: Dave Ware <davidw@realtimegenomics.com>
> > Date: 15.01.2016 01:41:43
> > Message:
> > contrib/subtree: fix "subtree split" skipped-merge bug

> > 'git subtree split' can incorrectly skip a merge even when both parents
> > act on the subtree, provided the merge results in a tree identical to
> > one of the parents. Fix by copying the merge if at least one parent is
> > non-identical, and the non-identical parent is not an ancestor of the
> > identical parent.

Hmm... I'm not expert on the implementation details of subtree split.
But I wonder if this should have said "if at least one parent is
non-subtree-identical"?  Maybe that's what was meant. I just went
through writing a similar "degenerate  merge" (to adopt the
filter-repo terminology for it) detection for git-alltrees, although
I'm not sure alltrees would handle this particular case to your liking
either.  I think I discard merges if either parent is
subtree-identical to the merge commit, probably keeping only the
matching branch, but I'm not sure that's always true, and that's
there, not here.

Cheers,
Doug

             reply	other threads:[~2021-06-25  0:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25  0:58 Douglas Leonard [this message]
2021-06-25  1:09 ` subtree split includes unrelated commits Douglas Leonard
  -- strict thread matches above, loose matches on Subject: below --
2021-06-18  8:47 Daniel Pauli

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

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

  git send-email \
    --in-reply-to=CADdMKP8kY-ry4ZWmp1hLCne328cC4thgavbkXOjdaNpD_ockSg@mail.gmail.com \
    --to=dleonard.dev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pauli@indel.ch \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.