Re: Git tree/blob and corresponding commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pascal Obry wrote:

> Now given a SHA1 I'd like to know which commit has created (was containing)
> this specific blob?

Why do you want to know?  The right method depends on your reason.  You
probably know more than I do about this, but here are my thoughts.

If some loose object of yours got corrupted and you are trying to
see what exactly is missing, then (for this task) you are in luck.  See
<http://www.kernel.org/pub/software/scm/git/docs/howto/recover-corrupted-blob-object.txt>.

If some packed object got corrupted, I'd be interested to hear how
this is handled.  I think there was discussion recently of how to
recover from that situation.  If you have the luxury, it might be good
to use unpack-objects to get to the first situation.

But I think that is not your situation.  I'll assume for definiteness
that some source file appeared out of thin air in your /lost+found and
you are trying to figure out what it is.  Then see
<http://thread.gmane.org/gmane.comp.version-control.git/44750/focus=44754>
and surrounding discussion.  You could use "git ls-tree -r" if you do
not have the filename.

Hope that helps,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux