From: Michael Haggerty Date: Tue, 06 May 2014 15:02:40 GMT Subject: Re: [PATCH 8/9] cache-tree: convert struct cache_tree to use object_id Message-ID: <5368F990.2040702@alum.mit.edu> In-Reply-To: <1399147942-165308-9-git-send-email-sandals@crustytoothpaste.net> On 05/03/2014 10:12 PM, brian m. carlson wrote: > [...] > diff --git a/cache-tree.c b/cache-tree.c > index 7fa524a..b7b2d06 100644 > --- a/cache-tree.c > +++ b/cache-tree.c In this file I also found a couple other "20" that could be converted to GIT_OID_RAWSZ: Around line 369: strbuf_add(&buffer, sha1, 20); And around line 490 (three instances): if (size < 20) goto free_return; hashcpy(it->sha1, (const unsigned char*)buf); buf += 20; size -= 20; I guess a search for "\<[24][0-9]\>" will find most (but not all!) of the literal constants that are derived from GIT_OID_RAWSZ and GIT_OID_HEXSZ. Michael -- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/