Thread (22 messages) 22 messages, 4 authors, 2016-06-15

Re: [PATCH 8/9] cache-tree: convert struct cache_tree to use object_id

From: Michael Haggerty <hidden>
Date: 2016-06-15 23:01:01

On 05/03/2014 10:12 PM, brian m. carlson wrote:
quoted hunk ↗ jump to hunk
[...]
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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help