Re: Guess the base-commit of a series

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 30, 2020 at 05:33:02PM +0000, Eric Wong wrote:
> > Given a/ b/ filenames and blob index information, is there a 
> > relatively easy way to find the latest branch commit where a patch 
> > series would apply cleanly (i.e. guess the base-commit)?
> 
> Not as far as I know...

Hmm... I'd assumed as much, given the whole "one-way" bit in "one-way 
hashing." :) However, I'm not very familiar with deep git internals, so 
wasn't sure if perhaps git kept a mapping index of sorts that could be 
queries.

There's a reasonable way to do it with the patches sent against the 
kernel, since they are likely against one of the tags created in the 
past few weeks. So, we just create a filename/blob index mapping and do:

git show tagname:filename | git hash-object --stdin

If we find a tagname where all the indexes match, then it's *probably* 
the base-commit (not guaranteed to be correct, obviously, because the 
patch may depend on changes made to other files in the tree, but 
hopefully we'll get most folks to start providing base-commit info soon 
and this guesswork will become increasingly obsolete).

-K



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux