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 /revision.c | |
parent | 7519a60ffa3f811ec49fd9956e284ff90f3b1cf1 (diff) | |
parent | ebbed3ba04ce8e3cd9dff0e86717fb7e3d42db37 (diff) | |
download | git-d5120daba4f91c97fb9eb77e32f0f9e009bb515a.tar.gz |
Merge branch 'ds/mark-parents-uninteresting-optim'
Micro optimization in revision traversal code.
* ds/mark-parents-uninteresting-optim:
revision.c: reduce object database queries
Diffstat (limited to 'revision.c')
-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) |