From: Junio C Hamano Date: Tue, 19 May 2009 07:04:18 GMT Subject: Re: [PATCH 2/3] Convert hash functions to char instead of struct object Message-ID: <7vk54d8tfx.fsf@alter.siamese.dyndns.org> In-Reply-To: <4A12507A.3050307@viscovery.net> Johannes Sixt writes: > Dan McGee schrieb: >> -static unsigned int hash_obj(struct object *obj, unsigned int n) >> +static unsigned int hash_chars(const unsigned char *c, unsigned int n) > > hash_chars suggests that this function hashes arbitrary character > sequences, but it doesn't do that. Wouldn't hash_object_id be a better > name? (And the parameter would then obviously be named sha1 or id.) Yes, the parameter to this function is what we call "unsigned char *sha1" everywhere else in the code. hash-object-id or hash-object-name is a good name for the function.