git rev-parse -q --verify $SHA doesn't always quiet errors

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

 



The -q flag to git rev-parse --verify is supposed to quiet all errors.
However it doesn't appear to quiet the "short SHA1 is ambiguous" error.

% cd Dev/git
% git rev-parse -q --verify e51d
error: short SHA1 e51d is ambiguous.

I took a quick look, and the error is being emitted deep within
sha1_name.c, far outside of any access to the -q flag. I'm not sure how
to go about fixing this. Does anyone have any ideas?

Alternatively, is there a better way to tell if a given string can
resolve into a full sha1 besides

  git rev-parse -q --verify "$word" 2>/dev/null

-Kevin Ballard
--
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]