Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/object.c b/object.c
index d093e17d24..5e72a78784 100644
--- a/object.c
+++ b/object.c
@@ -129,6 +129,10 @@ struct object *parse_object(unsigned char *sha1)
} else if (!strcmp(type, "commit")) {
struct commit *commit = lookup_commit(sha1);
parse_commit_buffer(commit, buffer, size);
+ if (!commit->buffer) {
+ commit->buffer = buffer;
+ buffer = NULL;
+ }
obj = &commit->object;
} else if (!strcmp(type, "tag")) {
struct tag *tag = lookup_tag(sha1);