sha1-file: drop has_sha1_file()
authorJeff King <peff@peff.net>
Mon, 7 Jan 2019 08:39:00 +0000 (03:39 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Jan 2019 17:41:06 +0000 (09:41 -0800)
commit5d3679ee023642825a5d3c0ca1eec251588a1848
treeb62b740259f8dfd219d25833be65ff675eddc2cc
parent98374a07c98d1acc200c423b87495365a59cce0b
sha1-file: drop has_sha1_file()

There are no callers left of has_sha1_file() or its with_flags()
variant. Let's drop them, and convert has_object_file() from a wrapper
into the "real" function. Ironically, the sha1 variant was just copying
into an object_id internally, so the resulting code is actually shorter!

We can also drop the coccinelle rules for catching has_sha1_file()
callers. Since the function no longer exists, the compiler will do that
for us.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/object_id.cocci
object-store.h
sha1-file.c