Re: [PATCH 06/10] object-file API: replace some use of check_object_signature()

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> Add a "hash_object_file_literally()" function to go with the existing
> "hash_object_file()" function. This is currently a wrapper for its
> sibling, but this change will allow us to change it to take an "enum
> object_type" in a subsequent commit.

This is a confusing renaming, because there is already a public
function that exists under that name.  And with this implementation,
...

> +static void hash_object_file_literally(const struct git_hash_algo *algo, const void *buf,
> +				       unsigned long len, const char *type,
> +				       struct object_id *oid)
> +{
> +	hash_object_file(algo, buf, len, type, oid);
> +}

... it is dubious why we need it.

> -int hash_object_file_literally(const void *buf, unsigned long len,
> -			       const char *type, struct object_id *oid,
> -			       unsigned flags)
> +int hash_write_object_file_literally(const void *buf, unsigned long len,
> +				     const char *type, struct object_id *oid,
> +				     unsigned flags)

This renaming is actually OK, if hash_object_file() which is also
public is renamed to hash_write_object_file() at the same time.

But I would say we should try to avoid such name churn to the public
namespace.




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

  Powered by Linux