Re: [PUB]corrupt repos does not return error with `git fsck`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 20, 2015, 20:16 UTC
- Message-ID
- <xmqqpp5vm2cw.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20150520182218.GD14561@peff.net>
Jeff King <peff@peff.net> writes:
> We could add a has_sha1_file() check in get_sha1 for this case.
Please don't. get_sha1() is merely "I have this string, which may be a 40-hex or an extended SHA-1 expression. Turn it into a 20-byte binary" and does not require you to have any such object.