Re: Find commit that referenced a blob first

2018-07-19 Thread Stefan Beller
On Thu, Jul 19, 2018 at 3:38 PM Junio C Hamano wrote: > > If the given object refers to a blob, it will be described as > > :, > > such that the blob can be found at in the , which itself > > describes the first commit in which this blob occurs in a reverse > > revision walk from HEAD. > > You

Re: Find commit that referenced a blob first

2018-07-19 Thread Junio C Hamano
Stefan Beller writes: > On Thu, Jul 19, 2018 at 2:02 PM Lars Schneider > wrote: >> >> Hi, >> >> I have a blob hash and I would like to know what commit referenced >> this blob first in a given Git repo. > > git describe > > If the given object refers to a blob, it will be described as > :, >

Re: Find commit that referenced a blob first

2018-07-19 Thread Jeff King
On Thu, Jul 19, 2018 at 02:19:34PM -0700, Stefan Beller wrote: > > I have a blob hash and I would like to know what commit referenced > > this blob first in a given Git repo. > > git describe > > If the given object refers to a blob, it will be described as > :, > such that the blob can be

Re: Find commit that referenced a blob first

2018-07-19 Thread Lars Schneider
> On Jul 19, 2018, at 11:19 PM, Stefan Beller wrote: > > On Thu, Jul 19, 2018 at 2:02 PM Lars Schneider > wrote: >> >> Hi, >> >> I have a blob hash and I would like to know what commit referenced >> this blob first in a given Git repo. > > git describe > > If the given object refers to

Re: Find commit that referenced a blob first

2018-07-19 Thread Stefan Beller
On Thu, Jul 19, 2018 at 2:02 PM Lars Schneider wrote: > > Hi, > > I have a blob hash and I would like to know what commit referenced > this blob first in a given Git repo. git describe If the given object refers to a blob, it will be described as :, such that the blob can be found at in the ,

Find commit that referenced a blob first

2018-07-19 Thread Lars Schneider
Hi, I have a blob hash and I would like to know what commit referenced this blob first in a given Git repo. I could iterate through all commits sorted by date (or generation number) and then recursively search in the referenced trees until I find my blob. I wonder, is this the most efficient