From: Christoph Duelli <duelli@melosgmbh.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: git@vger.kernel.org
Subject: Re: File info from SHA ID
Date: Fri, 04 Apr 2008 15:55:05 +0200 [thread overview]
Message-ID: <47F63339.3070903@melosgmbh.de> (raw)
In-Reply-To: <alpine.LFD.1.00.0804031009280.14670@woody.linux-foundation.org>
Linus Torvalds schrieb:
>
> On Thu, 3 Apr 2008, Christoph Duelli wrote:
>> Given (only) a SHA ID (say from a file's $ID$ expansion), is it possible to
>> determine the file's name, date of commit etc?
>
> Not directly, no.
>
> But you can get it indirectly with a number of variations on
>
> git whatchanged --raw --no-abbrev
>
> and then just searching for that SHA1 ID in the result. That will also
> show you where in the history that SHA1 came to be or went away.
>
> The SHA1 itself is _purely_ about the actual contents of the file, so it
> has no bearing on where that file actually exists, and two identical files
> in different places will have the same SHA1. So no SHA1 -> filename
> mapping can exist, but you can figure out where in the tree or history it
> existed if you just have the full repository.
Ok, thank you. I was able to use the output of "git whatchanged --raw
--no-abbrev" to achieve what I wanted to do.
--
Christoph Duelli
prev parent reply other threads:[~2008-04-04 13:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-03 16:58 File info from SHA ID Christoph Duelli
2008-04-03 17:16 ` Linus Torvalds
2008-04-04 13:55 ` Christoph Duelli [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=47F63339.3070903@melosgmbh.de \
--to=duelli@melosgmbh.de \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.