git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: ident hash usage question

From
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 20, 2009, 18:19 UTC
Message-ID
<81b0412b0910201119w7583487ag276cf964d0a85e@mail.gmail.com>
In-Reply-To
<81b0412b0910201116s694d7877rda872b368f1ae09a@mail.gmail.com>
On Tue, Oct 20, 2009 at 20:16, Alex Riesen <raa.lkml@gmail.com> wrote:
Show 10 quoted lines
> On Tue, Oct 20, 2009 at 19:24, Eugene Sajine <euguess@gmail.com> wrote:
>> I was able to get the $Id$ keyword to show the SHA-1 hash of the file
>> content, which is done using ident in gitattributes. Now I’m trying to
>> find a way to get more info about the file using only this hash.
>>
>> Could you , please, advise if there is a way to get file name and path
>> inside the repo by having only this Blob hash?
>
> It is not possible.
>

Well, not exactly impossible, but you can end up with multiple paths, some of which may not have anything to do the original path.

Just run git log --no-abbrev --raw --all and grep for the SHA-1
Previous: Alex RiesenNext: Eugene Sajine
Message 3 of 18 in “ident hash usage question”
  1. Eugene SajineOct 20, 2009
  2. Alex RiesenOct 20, 2009
  3. Alex RiesenOct 20, 2009
  4. Eugene SajineOct 20, 2009
  5. Alex RiesenOct 20, 2009
  6. Johannes SixtOct 20, 2009
  7. Alex RiesenOct 20, 2009
  8. Eugene SajineOct 20, 2009
  9. Junio C HamanoOct 20, 2009
  10. Eugene SajineOct 20, 2009
  11. Junio C HamanoOct 20, 2009
  12. Eugene SajineOct 20, 2009
  13. Daniel BarkalowOct 21, 2009
  14. Nanako ShiraishiOct 21, 2009
  15. Alex RiesenOct 20, 2009
  16. Eugene SajineOct 20, 2009
  17. Alex RiesenOct 21, 2009
  18. Eugene SajineOct 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.