Code

graph API: fix bug in graph_is_interesting()
[git.git] / graph.c
diff --git a/graph.c b/graph.c
index e466770208d73d8e1f5bc7f6b12728b6f2b7c6bb..9087f658495200eb671b87711d15c05ad84089ef 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -286,9 +286,10 @@ static int graph_is_interesting(struct git_graph *graph, struct commit *commit)
        }
 
        /*
-        * Uninteresting and pruned commits won't be printed
+        * Otherwise, use get_commit_action() to see if this commit is
+        * interesting
         */
-       return (commit->object.flags & (UNINTERESTING | TREESAME)) ? 0 : 1;
+       return get_commit_action(graph->revs, commit) == commit_show;
 }
 
 static struct commit_list *next_interesting_parent(struct git_graph *graph,