[llvm-dev] New LLVM git repository conversion prototype

via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 20 09:24:27 PST 2018


> If we just want the ability to refer to trunk commits by number,
> couldn't we just tag the initial commit as "genesis" and git-describe
> against that?

This works only for trunk; branches would re-use commit numbers, if
we count from the beginning of time.

In my company's repo, for branches we count from the branch point.
This makes the numbers for trunk and branches different enough that
we can easily tell the difference.

> If we do tag the version bump, I think the name has to be something
> like "8.0.0-base" or "8.0.0-first", to correctly describe the commit
> it's tagging.

Seems reasonable to me.

> > if you `git describe` the last commit before the branch for release ${N}
> (i.e., the last commit of N), the descriptor will be ${N+1} (or whatever
> tag was applied). The version bump commit will then be "${N+1}-1", meaning
> the second commit of the N+1 release (with commit hashes as appropriate).
> 
> I'm having trouble following the maths here, but if we tag the
> branchpoint, say "7.0.0-branchpoint", then the commits on trunk after
> that, i.e. the development of 8, will be described as "n patches after
> 7.0.0-branchpoint" which seems entirely correct to me: version 8 is
> stuff landed after the branchpoint for 7".

But commits on the 7.0.0 branch would *also* be described as "n patches
after 7.0.0-branchpoint" because the branchpoint is the common ancestor
of both branches.  I think that ambiguity in `describe` is not a good idea.

If we have a tag for the branchpoint, we also need one for the bump,
which would be reachable on master and not from the branch.

> > An easy way to reason about this is that the version bump tag should
> only be reachable from the release branch for that version. So if the 8.0
> bump is reachable from the 7.x release branch, that's going to result in
> `git describe` attributing commits with the wrong version.
> 
> I don't understand this part. Why would the 8.0 bump be reachable from
> the 7.x release branch? The version bump happens after the branch is
> created.

I also don't understand this part. The version bump is done on "master"
after the branch is created, yes? Ideally it's the first commit on master
that is *not* reachable from the 7.x release branch.

--paulr


More information about the llvm-dev mailing list