diff options
author | Johan Herland <johan@herland.net> | 2010-07-13 23:23:38 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-07-13 16:32:30 -0700 |
commit | 6bdc17d9a69bdd736901b115841479f5782a510e (patch) | |
tree | 241d9c697de99f1d0d24482e73d731c32abd38f3 /graph.h | |
parent | 449aeb10d5d28083199f82c444b55a03c545e956 (diff) | |
download | git-6bdc17d9a69bdd736901b115841479f5782a510e.tar.gz |
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 <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'graph.h')
-rw-r--r-- | graph.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -32,6 +32,17 @@ void graph_update(struct git_graph *graph, struct commit *commit); */ 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 |