diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-03-08 12:36:27 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-08 12:36:27 -0800 |
commit | d5120daba4f91c97fb9eb77e32f0f9e009bb515a (patch) | |
tree | d3fb871acb99c442aa60fb26df7819cb45e719c7 | |
parent | Merge branch 'ds/find-unique-abbrev-optim' (diff) | |
parent | revision.c: reduce object database queries (diff) | |
download | tgif-d5120daba4f91c97fb9eb77e32f0f9e009bb515a.tar.xz |
Merge branch 'ds/mark-parents-uninteresting-optim'
Micro optimization in revision traversal code.
* ds/mark-parents-uninteresting-optim:
revision.c: reduce object database queries
-rw-r--r-- | revision.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c index 5c1cb7277c..b42c836d7a 100644 --- a/revision.c +++ b/revision.c @@ -113,7 +113,8 @@ void mark_parents_uninteresting(struct commit *commit) * it is popped next time around, we won't be trying * to parse it and get an error. */ - if (!has_object_file(&commit->object.oid)) + if (!commit->object.parsed && + !has_object_file(&commit->object.oid)) commit->object.parsed = 1; if (commit->object.flags & UNINTERESTING) |