Next odd commit affecting `git subtree split` experiments with contrib/elftoolchain

Ed Maste emaste at
Wed Jun 17 02:25:18 UTC 2020

On Tue, 16 Jun 2020 at 14:41, Ed Maste <emaste at> wrote:
> I've found one new class of strange commit - r265044, which I've
> excluded from mergeinfo parsing (in the above list). However, svnweb
> highlights an issue:

I've now successfully used Tom Clarkson's patched git subtree[1] to
split elftoolchain out of cgit-beta, keeping the vendor branch history
intact, and avoiding the extraneous and bogus commits.

I used at
4c09cab462f2d27794d51a4dcb06df806dc9f3a6, and performed the following

% git log contrib/elftoolchain

1. Observe that the initial commit under that prefix is:

commit f4b5186d24f3e1969c32a49f126c8ad29ece63e9
Merge: 8b06418614b0 5265ace0e440
Author: Kai Wang <kaiw at>
Date:   Wed Jan 15 22:30:48 2014 +0000

    Copy libelf, libdwarf and common files from vendor/ to contrib/.

2. Inspect the two merge parents and determine that the second
(5265ace0e440) is the initial elftoolchain import:

it 5265ace0e440a23fb522c516f4ee20f43eaed2b3
Author: Kai Wang <kaiw at>
Date:   Wed Jan 15 08:43:20 2014 +0000

    Initial import of elftoolchain r2974.

    Obtained from:

3. Split the subtree, using patched git:

~/src/git/contrib/subtree/ split \
    --prefix=contrib/elftoolchain \

The "onto" revision is the initial hash in the subtree. With the
patched git subtree this is needed, because we don't have metadata
about the subtree (as would be created if `git subtree add` was used
to initially create the subtree).

After some time the hash of the split tree is printed:

At this point I can do what I like with the subtree. I could create a
branch for it, or push it to a GitHub repo:

% git push github-elftoolchain \

Which is now available here:

More information about the freebsd-git mailing list