path: root/commit.h
diff options
authorLinus Torvalds <>2006-06-18 01:26:18 (GMT)
committerJunio C Hamano <>2006-06-18 01:49:45 (GMT)
commitd3ff6f55012c939740ce0982b24aeb6fba3c6e4f (patch)
tree3784f041b9ceb25a8092b85f1d86119da7bc5a45 /commit.h
parent885a86abe2e9f7b96a4e2012183c6751635840aa (diff)
Move "void *util" from "struct object" into "struct commit"
Every single user actually wanted this only for commit objects, and we have no reason to waste space on it for other object types. So just move the structure member from the low-level "struct object" into the "struct commit". This leaves the commit object the same size, and removes one unnecessary pointer from all other object allocations. This shrinks memory usage (still at a fairly hefty half-gig, admittedly) of "git-rev-list --all --objects" on the mozilla repo by another 5% in my tests. Signed-off-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'commit.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index c9de167..7c9ca3f 100644
--- a/commit.h
+++ b/commit.h
@@ -11,6 +11,7 @@ struct commit_list {
struct commit {
struct object object;
+ void *util;
unsigned long date;
struct commit_list *parents;
struct tree *tree;