From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <e@yhbt.net>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
git@vger.kernel.org
Subject: Re: Guess the base-commit of a series
Date: Thu, 30 Apr 2020 12:49:21 -0700 [thread overview]
Message-ID: <xmqqk11wsqim.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200430173302.GA18877@dcvr> (Eric Wong's message of "Thu, 30 Apr 2020 17:33:02 +0000")
Eric Wong <e@yhbt.net> writes:
> Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
>> Hello:
>>
>> 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...
Me neither.
I am assuming that this is in the context of the kernel project,
where there are numerous but manageable number of well known
repositories, so Konstantin can probably create a (bare) repository
that fetches from all of them into refs/remotes/{linus,next,...}/
remote-tracking branches. With that, running this command
$ git rev-list --all | git diff-tree --stdin --raw -r
and write a script that parses its output may not be too hard.
I am not sure what Konstantin wanted to say with "the latest branch
commit", but if the starting point (i.e. branch) is known, then such
a script can read from the output of the above pipeline but instead
of starting from "--all", start the traversal from the branch tip.
There may not be any such tree with all those blobs. For the second
patch in an N-patch series, there won't be such a tree anywhere
other than the author's repository unless the first patch of the
series has been applied somewhere well known.
next prev parent reply other threads:[~2020-04-30 19:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 17:21 Guess the base-commit of a series Konstantin Ryabitsev
2020-04-30 17:33 ` Eric Wong
2020-04-30 19:49 ` Junio C Hamano [this message]
2020-04-30 19:52 ` Konstantin Ryabitsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqk11wsqim.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=e@yhbt.net \
--cc=git@vger.kernel.org \
--cc=konstantin@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).