]> git.ipfire.org Git - thirdparty/git.git/blobdiff - object.c
provide a helper to set the commit buffer
[thirdparty/git.git] / object.c
index 57a0890a87b66ea493337409606e57fd44d29f90..44ca6572045e055f21094bf6fffad43ed36da9ca 100644 (file)
--- a/object.c
+++ b/object.c
@@ -198,7 +198,7 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t
                        if (parse_commit_buffer(commit, buffer, size))
                                return NULL;
                        if (!commit->buffer) {
-                               commit->buffer = buffer;
+                               set_commit_buffer(commit, buffer);
                                *eaten_p = 1;
                        }
                        obj = &commit->object;