{"thread":{"id":"43542","subject":"Making literal \"20\" symbolic","startedAt":"2006-11-20T10:49:35Z","lastAt":"2006-11-20T10:54:59Z","messageCount":2,"participants":["Andy Parkins","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"295378","messageId":"200611201049.41024.andyparkins@gmail.com","threadId":"43542","inReplyTo":null,"subject":"Making literal \"20\" symbolic","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2006-11-20T10:49:35Z","receivedAt":"2006-11-20T10:49:35Z","isPatch":false,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"Hello,\n\nI notice that there are a lot of uses of the literal 20 throughout git; I'd \nlike to change them (as appropriate) to HASH_WIDTH, or similar; and maybe \nHASH_WIDTH_ASCII for the 40s.\n\nIs there a particular header file that is appropriate to put \n\n#define HASH_WIDTH 20\n#define HASH_WIDTH_ASCII (HASH_WIDTH*2)\n\nOf course, I plan to review each instance to make sure I'm not changing a \nnon-hash width 20.\n\n\nAndy\n-- \nDr Andy Parkins, M Eng (hons), MIEE\n"},{"id":"298754","messageId":"7v7ixq4ccc.fsf@assigned-by-dhcp.cox.net","threadId":"43542","inReplyTo":"200611201049.41024.andyparkins@gmail.com","subject":"Re: Making literal \"20\" symbolic","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-20T10:54:59Z","receivedAt":"2006-11-20T10:54:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Parkins <andyparkins@gmail.com> writes:\n\n> I notice that there are a lot of uses of the literal 20 throughout git; I'd \n> like to change them (as appropriate) to HASH_WIDTH, or similar; and maybe \n> HASH_WIDTH_ASCII for the 40s.\n>\n> Is there a particular header file that is appropriate to put \n>\n> #define HASH_WIDTH 20\n> #define HASH_WIDTH_ASCII (HASH_WIDTH*2)\n>\n> Of course, I plan to review each instance to make sure I'm not changing a \n> non-hash width 20.\n\nProbably in cache.h, close to where it defines is_null_sha1(),\nhashcmp(), and friends, is the right place.\n\nThere are few places that say 42 (because we have 40-hex at the\nbeginning of line, followed by a single whitespace and then\nsomething should follow so line length must be at least 42\nchars), so hunting them all would be a lot of work, but I do\nthink this is a worthwhile cleanup.\n"}]}