author | Linus Torvalds <torvalds@osdl.org> | |
Fri, 30 Jun 2006 18:20:33 +0000 (11:20 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 2 Jul 2006 01:28:15 +0000 (18:28 -0700) | ||
commit | 0556a11a0df6b4119e01aa77dfb795561e62eb34 | |
tree | 34c8f9c263c1c20592d3f56c3d86bea322577155 | tree | snapshot |
parent | 6631c73685bea3c6300938f4900db0d0c6bee457 | commit | diff |
git object hash cleanups
This IMNSHO cleans up the object hashing.
The hash expansion is separated out into a function of its own, the hash
array (and size) names are made more obvious, and the code is generally
made to look a bit more like the object-ref hashing.
It also gets rid of "find_object()" returning an index (or negative
position if no object is found), since that is made redundant by the
simplified object rehashing. The basic operation is now "lookup_object()"
which just returns the object itself.
There's an almost unmeasurable speed increase, but more importantly, I
think the end result is more readable.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This IMNSHO cleans up the object hashing.
The hash expansion is separated out into a function of its own, the hash
array (and size) names are made more obvious, and the code is generally
made to look a bit more like the object-ref hashing.
It also gets rid of "find_object()" returning an index (or negative
position if no object is found), since that is made redundant by the
simplified object rehashing. The basic operation is now "lookup_object()"
which just returns the object itself.
There's an almost unmeasurable speed increase, but more importantly, I
think the end result is more readable.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
object.c | diff | blob | history |