Re: Finding a commit based on the diff index line?
- From
Philip Oakley <philipoakley@iee.org>
- Date
- Sep 17, 2016, 19:23 UTC
- Message-ID
- <FD07B781038A4C878F6D0152A4ECE580@PhilipOakley>
- In-Reply-To
- <CAPc5daUdM4wwY7C_YKx0DkW3kty+VewksMMXG39bBr1K-JxBag@mail.gmail.com>
Show 8 quoted lines
> 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).
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....
It's tricky curating old mistakes ;-)
Thanks for the pointer.
Show 35 quoted lines
> 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