Re: "git log -- SHA-1" - how to get/simulate this functionality?

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

 



On Mon, Apr 26, 2010 at 19:56, Eugene Sajine <euguess@xxxxxxxxx> wrote:
> On Mon, Apr 26, 2010 at 1:54 PM, Eugene Sajine <euguess@xxxxxxxxx> wrote:
>> Hi,
>>
>> I'm wondering if there is a way to get some repo information if the
>> only thing i know is SHA-1 (no full path to the file)
>
> I mean of course the SHA-1 of the blob, i.e. the result of git
> hash-object some_file

Try 'git cat-file -t <sha>'. It prints what object type is under the hash.
Than you can use either 'git cat-file <type> <sha>' (the most precise version,
which shall fail if anything is wrong), 'git cat-file -p <sha>' or plain
'git show <sha>' (which always works, unless repo's broken).
--
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]