* Making literal "20" symbolic
@ 2006-11-20 10:49 Andy Parkins
2006-11-20 10:54 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Andy Parkins @ 2006-11-20 10:49 UTC (permalink / raw)
To: git
Hello,
I notice that there are a lot of uses of the literal 20 throughout git; I'd
like to change them (as appropriate) to HASH_WIDTH, or similar; and maybe
HASH_WIDTH_ASCII for the 40s.
Is there a particular header file that is appropriate to put
#define HASH_WIDTH 20
#define HASH_WIDTH_ASCII (HASH_WIDTH*2)
Of course, I plan to review each instance to make sure I'm not changing a
non-hash width 20.
Andy
--
Dr Andy Parkins, M Eng (hons), MIEE
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Making literal "20" symbolic
2006-11-20 10:49 Making literal "20" symbolic Andy Parkins
@ 2006-11-20 10:54 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2006-11-20 10:54 UTC (permalink / raw)
To: Andy Parkins; +Cc: git
Andy Parkins <andyparkins@gmail.com> writes:
> I notice that there are a lot of uses of the literal 20 throughout git; I'd
> like to change them (as appropriate) to HASH_WIDTH, or similar; and maybe
> HASH_WIDTH_ASCII for the 40s.
>
> Is there a particular header file that is appropriate to put
>
> #define HASH_WIDTH 20
> #define HASH_WIDTH_ASCII (HASH_WIDTH*2)
>
> Of course, I plan to review each instance to make sure I'm not changing a
> non-hash width 20.
Probably in cache.h, close to where it defines is_null_sha1(),
hashcmp(), and friends, is the right place.
There are few places that say 42 (because we have 40-hex at the
beginning of line, followed by a single whitespace and then
something should follow so line length must be at least 42
chars), so hunting them all would be a lot of work, but I do
think this is a worthwhile cleanup.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-20 10:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-20 10:49 Making literal "20" symbolic Andy Parkins
2006-11-20 10:54 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox