git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Strain, Roger L." <roger.strain@swri.org>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Subtree bugs
Date: Wed, 26 Sep 2018 20:53:18 +0000	[thread overview]
Message-ID: <544dbf78cd684f74bf1e4da7826ed3e8@MBX260.adm.swri.edu> (raw)

I emailed the group yesterday regarding a possible error in the subtree script. I've continued debugging and since have been able to reproduce the problem. In fact, there are two failure cases which may expose three different problems. To demonstrate, the following commands create two repos (main and sub), add a variety of commits, perform some merges, splits, and rejoins, and finally perform two splits. These two splits generate a commit history which cannot be pushed back to the subtree repo in two different manners.

Commands to demonstrate both failures are here:
https://gist.github.com/FoxFireX/1b794384612b7fd5e7cd157cff96269e

Short summary of three problems involved:
1. Split using rejoins fails in some cases where a commit has a parent which was a parent commit further upstream from a rejoin, causing a new initial commit to be created, which is not related to the original subtree commits.
2. Split using rejoins fails to generate a merge commit which may have triaged the previous problem, but instead elected to use only the parent which is not connected to the original subtree commits. (This may occur when the commit and both parents all share the same subtree hash.)
3. Split ignoring joins also ignores the original add commit, which causes content prior to the add to be considered part of the subtree graph, changing the commit hashes so it is not connected to the original subtree commits.

I'm going to start looking at how to fix/work around either or both of these issues because it's holding up some work for us, but if anyone else has seen something like this, or has suggestions, I'd be happy to hear them.  If I do come up with a fix, I'll ask for approval to contribute it back.

-- 
Roger Strain

                 reply	other threads:[~2018-09-26 20:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=544dbf78cd684f74bf1e4da7826ed3e8@MBX260.adm.swri.edu \
    --to=roger.strain@swri.org \
    --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).