[cfe-dev] [llvm-dev] [llvm-foundation] Sequential ID Git hook

Mehdi Amini via cfe-dev cfe-dev at lists.llvm.org
Fri Jul 8 09:45:06 PDT 2016



Sent from my iPhone

> On Jul 8, 2016, at 9:18 AM, Renato Golin <renato.golin at linaro.org> wrote:
> 
>> On 8 July 2016 at 03:14, Robinson, Paul <paul.robinson at sony.com> wrote:
>> I could see wanting to compare data from master and a release branch.  If
>> that means sequential IDs need to work across branches, then we're back to
>> needing a fancier solution than 'rev-list –count'.
> 
> How would you do this in SVN anyway?
> 
> Branch commits are inter-twined with trunk commits, and comparing them
> numerically doesn't yield the results you expect.

If I give the revision that corresponds to some 3.8 branch commit and compare to another in master, I think I get exactly the result I expect. 
I may not understand your point here...


> 
> At least in Git, the history is tied up via "parent" and not via
> sequential IDs, so you can actually walk the path.
> 
> Sequential numbers are only meaningful for linear histories. Branches,
> whether on Git or Svn break that promise.

SVN has monotonic increasing ids that are unique across branches.


> 
> If we make LNT work with Git "as Git", then all problems are solved.
> And meanwhile, we get to work with LNT "as SVN" via rev-list --count.

You missed the point that in a single instance of LNT a revision number has to be unique. 
The rev-list thing won't provide this across branches.
A rev-list count number won't identify a revision, you need the tuple (branch, count), which is less easy or less compatible with existing systems.

-- 
Mehdi


> 
> cheers,
> --renato



More information about the cfe-dev mailing list