From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Dan McGee <dpmcgee@gmail.com>,
git@vger.kernel.org, Johannes.Schindelin@gmx.de,
gitster@pobox.com
Subject: Re: [PATCH 2/3] Convert hash functions to char instead of struct object
Date: Tue, 19 May 2009 00:04:18 -0700 [thread overview]
Message-ID: <7vk54d8tfx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4A12507A.3050307@viscovery.net> (Johannes Sixt's message of "Tue\, 19 May 2009 08\:23\:54 +0200")
Johannes Sixt <j.sixt@viscovery.net> 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.
next prev parent reply other threads:[~2009-05-19 7:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 1:17 [PATCH] Fix type-punning issues Dan McGee
2009-05-12 7:57 ` Junio C Hamano
2009-05-19 4:32 ` Dan McGee
2009-05-19 4:34 ` [PATCH 1/3] Unify signedness in hashing calls Dan McGee
2009-05-19 4:34 ` [PATCH 2/3] Convert hash functions to char instead of struct object Dan McGee
2009-05-19 4:34 ` [PATCH 3/3] Unify sha1 char hash functions Dan McGee
2009-05-19 6:23 ` [PATCH 2/3] Convert hash functions to char instead of struct object Johannes Sixt
2009-05-19 7:04 ` Junio C Hamano [this message]
2009-05-12 8:13 ` [PATCH] Fix type-punning issues Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vk54d8tfx.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=dpmcgee@gmail.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).