[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: Guess the base-commit of a series
From: Konstantin Ryabitsev <konstantin () linuxfoundation ! org>
Date: 2020-04-30 19:52:11
Message-ID: 20200430195211.36zhvfcdrpfirewr () chatter ! i7 ! local
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic