summaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index e6ec79f81a..a9604f35a3 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -119,6 +119,11 @@ static struct commit *deref_without_lazy_fetch(const struct object_id *oid,
{
enum object_type type;
struct object_info info = { .typep = &type };
+ struct commit *commit;
+
+ commit = lookup_commit_in_graph(the_repository, oid);
+ if (commit)
+ return commit;
while (1) {
if (oid_object_info_extended(the_repository, oid, &info,