On Tue, Jun 9, 2015 at 11:28 PM, brian m. carlson
<sand...@crustytoothpaste.net> wrote:
> diff --git a/sha1_file.c b/sha1_file.c
> index 7e38148..09f7f03 100644
> --- a/sha1_file.c
> +++ b/sha1_file.c
> @@ -3173,6 +3173,11 @@ int has_sha1_file(const unsigned char *sha1)
>         return find_pack_entry(sha1, &e);
>  }
>
> +int has_object_file(const struct object_id *oid)
> +{
> +       return has_sha1_file(oid->hash);
> +}
> +

This version could be "static inline" and placed in cache.h. Though it
may be premature optimization. On top of my head I can't recall any
place where has_sha1_file() is used so many times for this extra call
to become significant overhead.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to