From: "Philip Oakley" <philipoakley@iee.org>
To: "Philip Oakley" <philipoakley@iee.org>,
"Junio C Hamano" <gitster@pobox.com>
Cc: "Git List" <git@vger.kernel.org>
Subject: Re: Finding a commit based on the diff index line?
Date: Sun, 18 Sep 2016 20:37:31 +0100 [thread overview]
Message-ID: <4BB675F0AED14A309DC90DDDB08F441B@PhilipOakley> (raw)
In-Reply-To: FD07B781038A4C878F6D0152A4ECE580@PhilipOakley
From: "Philip Oakley" <philipoakley@iee.org>
>> From: Junio C Hamano
>> Sent: Saturday, September 17, 2016 5:30 PM
>>
>> Does it count as simple to use pager's search feature in
>> "log --raw" output piped to it?
>>
>> Pardon typos & html; typed on a phone
>>
>
> The `log --raw` looks useful, though I think (IIUC) I also have a problem
> that (obviously?) these commits are not linked behind any existing ref
> (except maybe the reflogs which I'm not up to speed on).
>
For others that may be reading... The command I eventually ended up using to
find old series was:
git reflog HEAD --grep-reflog='rebase -i (finish)' | cut -c1-7 | xargs -n1
git quote
where the alias.quote = log -1 --pretty='tformat:%h (%s, %ad)' --date=short
I can then compare the dates of my corrective rebases to the patch
submission dates to find the (local sha1 of) missing series.
> I had somehow hoped for some neat magic command or rev specifier that took
> the revs as alternates to the `-- <paths>` in rev-parse or some such....
Though locating a commit based on a diff's index line does still feel to be
something that should be possible.
>
> It's tricky curating old mistakes ;-)
>
> Thanks for the pointer.
>
>> On Sep 17, 2016 07:33, "Philip Oakley" <philipoakley@iee.org> wrote:
>>
>> > Hi,
>> >
>> > I'm curating some of my old patch series (i.e. doing some tidying up)
>> > and
>> > I'm trying to determine the commits that generated some of my patches
>> > so
>> > that I can see if I still have them after they were rebased (a 'name
>> > that
>> > dangling branch' problem).
>> >
>> > Is there an easy way of finding the commit sha1 that contains the given
>> > diff
>> > index line.
>> >
>> > For example.
>> > index fa05269..57033dd 100755
>> > or
>> > index 8ebcded..d9ab360 100644
>> >
>> > which both should get back to Jeff King's 36d6792 (t0006: test various
>> > date
>> > formats, 2016-06-20).
>> >
>> > It feels like it is something that should already possible without a
>> > mini-script. We have the rev range which should limit the range to a
>> > single
>> > commit, though if random blob revs were given the commit range would be
>> > 'scattered'.
>> >
>> >
>> > Is there a simple quick way of achieving this?
>> >
>> > --
>> > Philip
>
>
prev parent reply other threads:[~2016-09-18 19:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-17 14:33 Finding a commit based on the diff index line? Philip Oakley
[not found] ` <CAPc5daUN7s+asu=drJRp=d1a5VRvG_EFNTsTqaQB+NZGDrzRmw@mail.gmail.com>
[not found] ` <CAPc5daUsRtR0=C8D=gqTtk=2erqX1DHsYNbQzmyAyw+prCBrfQ@mail.gmail.com>
[not found] ` <CAPc5daUdM4wwY7C_YKx0DkW3kty+VewksMMXG39bBr1K-JxBag@mail.gmail.com>
2016-09-17 19:23 ` Philip Oakley
2016-09-18 19:37 ` Philip Oakley [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BB675F0AED14A309DC90DDDB08F441B@PhilipOakley \
--to=philipoakley@iee.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox