Re: [RFC] git cat-file "literally" option

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

 



On Wed, Feb 18, 2015 at 7:50 PM, karthik nayak <karthik.188@xxxxxxxxx> wrote:
> Also,
> Is there any way I can get the type of object made via git hash-object
> --literally. The problem I'm facing is "sha1_object_info()" returns a
> object_type enum, so objects not specified there are considered as errors.

Use what sha1_object_info() uses behind the scene. Loose object
encodes object type as a string, you could just print that string and
skip the enum object_type conversion. You probably need special
treatment for packed objects too. See parse_sha1_header() and
unpack_object_header().
-- 
Duy
--
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]