[PATCH] -w support for git-ssh-pull/push
[gitweb.git] / object.c
index d093e17d240cff9e62a62b74ca4b3c86a472f54a..5e72a7878488922cfeeb5dba385d72049253f7c3 100644 (file)
--- 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);