projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Add the merge test Linus called "test script from hell".
[git.git]
/
read-tree.c
diff --git
a/read-tree.c
b/read-tree.c
index
604884a
..
f6298e5
100644
(file)
--- a/
read-tree.c
+++ b/
read-tree.c
@@
-11,11
+11,14
@@
static int unpack_tree(unsigned char *sha1)
{
void *buffer;
unsigned long size;
{
void *buffer;
unsigned long size;
+ int ret;
buffer = read_object_with_reference(sha1, "tree", &size, 0);
if (!buffer)
return -1;
buffer = read_object_with_reference(sha1, "tree", &size, 0);
if (!buffer)
return -1;
- return read_tree(buffer, size, stage);
+ ret = read_tree(buffer, size, stage);
+ free(buffer);
+ return ret;
}
static char *lockfile_name;
}
static char *lockfile_name;
@@
-191,7
+194,7
@@
int main(int argc, char **argv)
merge = 1;
continue;
}
merge = 1;
continue;
}
- if (get_sha1
_hex
(arg, sha1) < 0)
+ if (get_sha1(arg, sha1) < 0)
usage(read_tree_usage);
if (stage > 3)
usage(read_tree_usage);
usage(read_tree_usage);
if (stage > 3)
usage(read_tree_usage);