Re: git cat-file -e behavior

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

 



Hi

Dne 29.2.2016 v 12:44 Jeff King napsal(a):
> It looks like it has been this way forever. The first thing we do with
> the object is resolve its name to a sha1, and that's where the error you
> see comes from. And then we actually check whether we have the object.
> 
> I think the intended use was to feed it a sha1 to see if it exists. Then
> the name-resolution step is a noop.

I found this as best way to check whether file exists in branch.
Checking git ls-tree output seems less error prone than checking return
value of git cat-file -e...

> I'm not sure if the behavior you are seeing is all that bad (the
> documentation could be read as suppressing the normal stdout output, but
> error messages remain), 

I understand this, that's why I'm asking whether it's expected output or
not :-).

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com

Attachment: signature.asc
Description: OpenPGP digital signature


[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]