Skip to content

Commit d5120da

Browse files
committed
Merge branch 'ds/mark-parents-uninteresting-optim'
Micro optimization in revision traversal code. * ds/mark-parents-uninteresting-optim: revision.c: reduce object database queries
2 parents 7519a60 + ebbed3b commit d5120da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

revision.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ void mark_parents_uninteresting(struct commit *commit)
113113
* it is popped next time around, we won't be trying
114114
* to parse it and get an error.
115115
*/
116-
if (!has_object_file(&commit->object.oid))
116+
if (!commit->object.parsed &&
117+
!has_object_file(&commit->object.oid))
117118
commit->object.parsed = 1;
118119

119120
if (commit->object.flags & UNINTERESTING)

0 commit comments

Comments
 (0)