X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=graph.h;fp=graph.h;h=f188168158659b1a1167a623ea1d580ad395094c;hb=6bdc17d9a69bdd736901b115841479f5782a510e;hp=b82ae87a491454aa119476ac9609ad176e8c9406;hpb=449aeb10d5d28083199f82c444b55a03c545e956;p=git.git diff --git a/graph.h b/graph.h index b82ae87a4..f18816815 100644 --- a/graph.h +++ b/graph.h @@ -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