projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify "diff-tree" output, and only keep track of one single name-base.
[git.git]
/
commit-tree.c
diff --git
a/commit-tree.c
b/commit-tree.c
index
840307a
..
4fe64ce
100644
(file)
--- a/
commit-tree.c
+++ b/
commit-tree.c
@@
-1,3
+1,8
@@
+/*
+ * GIT - The information manager from hell
+ *
+ * Copyright (C) Linus Torvalds, 2005
+ */
#include "cache.h"
#include <pwd.h>
#include "cache.h"
#include <pwd.h>
@@
-106,6
+111,7
@@
int main(int argc, char **argv)
int parents = 0;
unsigned char tree_sha1[20];
unsigned char parent_sha1[MAXPARENT][20];
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;
char *gecos, *realgecos;
char *email, realemail[1000];
char *date, *realdate;
@@
-167,6
+173,7
@@
int main(int argc, char **argv)
finish_buffer("commit ", &buffer, &size);
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;
}
return 0;
}