path: root/graph.c
diff options
authorJohan Herland <>2010-07-13 21:23:38 (GMT)
committerJunio C Hamano <>2010-07-13 23:32:30 (GMT)
commit6bdc17d9a69bdd736901b115841479f5782a510e (patch)
tree241d9c697de99f1d0d24482e73d731c32abd38f3 /graph.c
parent449aeb10d5d28083199f82c444b55a03c545e956 (diff)
Make graph_next_line() available in the graph.h API
In order to successfully use the graph API from a context other than the stdout/command-line scenario (where the graph_show_* functions are suitable), we need direct access to graph_next_line(), to drive the graph drawing process. Signed-off-by: Johan Herland <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'graph.c')
1 files changed, 1 insertions, 12 deletions
diff --git a/graph.c b/graph.c
index ac7c605..47397da 100644
--- a/graph.c
+++ b/graph.c
@@ -8,17 +8,6 @@
/* Internal API */
- * Output the next line for a graph.
- * This formats the next graph line into the specified strbuf. It is not
- * terminated with a newline.
- *
- * Returns 1 if the line includes the current commit, and 0 otherwise.
- * graph_next_line() will return 1 exactly once for each time
- * graph_update() is called.
- */
-static int graph_next_line(struct git_graph *graph, struct strbuf *sb);
* Output a padding line in the graph.
* This is similar to graph_next_line(). However, it is guaranteed to
* never print the current commit line. Instead, if the commit line is
@@ -1143,7 +1132,7 @@ static void graph_output_collapsing_line(struct git_graph *graph, struct strbuf
graph_update_state(graph, GRAPH_PADDING);
-static int graph_next_line(struct git_graph *graph, struct strbuf *sb)
+int graph_next_line(struct git_graph *graph, struct strbuf *sb)
switch (graph->state) {