]> git.ipfire.org Git - thirdparty/git.git/blobdiff - object.c
parse_object(): check commit-graph when skip_hash set
[thirdparty/git.git] / object.c
index 8f6de090781b7422e9bf6c42b959f1501c9492ef..2e4589bae50105da847ad5b861d1752fb26dec77 100644 (file)
--- a/object.c
+++ b/object.c
@@ -279,6 +279,12 @@ struct object *parse_object_with_flags(struct repository *r,
        if (obj && obj->parsed)
                return obj;
 
+       if (skip_hash) {
+               struct commit *commit = lookup_commit_in_graph(r, repl);
+               if (commit)
+                       return &commit->object;
+       }
+
        if ((obj && obj->type == OBJ_BLOB && repo_has_object_file(r, oid)) ||
            (!obj && repo_has_object_file(r, oid) &&
             oid_object_info(r, oid, NULL) == OBJ_BLOB)) {