summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 449aeb1)
raw | patch | inline | side by side (parent: 449aeb1)
author | Johan Herland <johan@herland.net> | |
Tue, 13 Jul 2010 21:23:38 +0000 (23:23 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 13 Jul 2010 23:32:30 +0000 (16:32 -0700) |
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 <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
graph.c | patch | blob | history | |
graph.h | patch | blob | history |
index ac7c60540645761d3c99fb405a69cb2d06aaddc2..47397daca3ac350ed12e20b3fb3cdce6767d9db4 100644 (file)
--- a/graph.c
+++ b/graph.c
/* 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
@@ -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) {
case GRAPH_PADDING:
index b82ae87a491454aa119476ac9609ad176e8c9406..f188168158659b1a1167a623ea1d580ad395094c 100644 (file)
--- a/graph.h
+++ b/graph.h
*/
int graph_is_commit_finished(struct git_graph const *graph);
+/*
+ * 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.
+ */
+int graph_next_line(struct git_graph *graph, struct strbuf *sb);
+
/*
* graph_show_*: helper functions for printing to stdout