aboutsummaryrefslogtreecommitdiff
path: root/commit-tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-09 17:09:34 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-09 17:09:34 -0700
commitd6d3f9d0125a7215f3cdc2600b2307ca55b69536 (patch)
treea869cb0789d8ad87f04d28dd9b703f3ff343a4a7 /commit-tree.c
parent4e6616ab77ed6a53f857d4b1082c4dc4140f34f5 (diff)
downloadgit-d6d3f9d0125a7215f3cdc2600b2307ca55b69536.tar.gz
git-d6d3f9d0125a7215f3cdc2600b2307ca55b69536.tar.xz
This implements the new "recursive tree" write-tree.
It's got some debugging printouts etc still in it, but testing on the kernel seems to show that it does indeed fix the issue with huge tree files for each commit.
Diffstat (limited to 'commit-tree.c')
-rw-r--r--commit-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/commit-tree.c b/commit-tree.c
index 0d7852f7f..4fe64ce0b 100644
--- a/commit-tree.c
+++ b/commit-tree.c
@@ -111,6 +111,7 @@ int main(int argc, char **argv)
int parents = 0;
unsigned char tree_sha1[20];
unsigned char parent_sha1[MAXPARENT][20];
+ unsigned char commit_sha1[20];
char *gecos, *realgecos;
char *email, realemail[1000];
char *date, *realdate;
@@ -172,6 +173,7 @@ int main(int argc, char **argv)
finish_buffer("commit ", &buffer, &size);
- write_sha1_file(buffer, size);
+ write_sha1_file(buffer, size, commit_sha1);
+ printf("%s\n", sha1_to_hex(commit_sha1));
return 0;
}