Web lists-archives.com

Bug report: Subtree split including extra commits

Apologies if this is the wrong place to send a bug report for
Contributed software.

I've run into what seems like an issue/bug with git subtree.

I am trying to split a single directory of our repo into its own repo
using git subtree. I ran the the following command from our project
git subtree split --prefix=geekui2 -b geekui2-split
where geekui2 is the name of the subdir.

For commits before mid 2017, the created split branch contains our
entire commit history, regardless whether or not they include changes
in geekui2. For commits after that point, the commits are properly
filtered to include only commits that contain changes in geekui2.

The upshot is that if I push the branch to a new repo, and check out
one of those earlier commits, I can essentially recover the entire
codebase of our application (at that point), not just the content in
geekui2. Since our goal was to share part of our repo while keeping
the rest of it private, this is obviously a problem.

I've also tried using git-subrepo for this split--it seems to
correctly filter the commits, excluding all commits without changes to
geekui2. So something seems to be going wrong with the way git-subtree
handles this relative to git subrepo.

Unfortunately, there is a lot going on in our repo--I have no idea how
I would generate a minimal reproduction of this.

While our repo is private, I'm happy to help try to help debug this if
someone wants to take a look at this issue, although it is not my area
of expertise.

My git version is 2.16.1, and I am running it on macOS 10.12.6.

I am not subscribed to the git mailing list, so if anyone wants to get
in touch with me about this, I'm most likely to see it if you send an

Daniel Karp