diff options
Diffstat (limited to 'list-objects.c')
-rw-r--r-- | list-objects.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/list-objects.c b/list-objects.c index 6cbedf0280..206816fa9c 100644 --- a/list-objects.c +++ b/list-objects.c @@ -162,15 +162,17 @@ void mark_edges_uninteresting(struct rev_info *revs, show_edge_fn show_edge) } mark_edge_parents_uninteresting(commit, revs, show_edge); } - for (i = 0; i < revs->cmdline.nr; i++) { - struct object *obj = revs->cmdline.rev[i].item; - struct commit *commit = (struct commit *)obj; - if (obj->type != OBJ_COMMIT || !(obj->flags & UNINTERESTING)) - continue; - mark_tree_uninteresting(commit->tree); - if (revs->edge_hint && !(obj->flags & SHOWN)) { - obj->flags |= SHOWN; - show_edge(commit); + if (revs->edge_hint) { + for (i = 0; i < revs->cmdline.nr; i++) { + struct object *obj = revs->cmdline.rev[i].item; + struct commit *commit = (struct commit *)obj; + if (obj->type != OBJ_COMMIT || !(obj->flags & UNINTERESTING)) + continue; + mark_tree_uninteresting(commit->tree); + if (!(obj->flags & SHOWN)) { + obj->flags |= SHOWN; + show_edge(commit); + } } } } |