Make graph_next_line external to other part of git

We will use it in line level log output.

Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Bo Yang
2010-08-11 23:03:37 +08:00
committed by Junio C Hamano
parent 89e8dbeb5c
commit 267115871a
2 changed files with 12 additions and 12 deletions

13
graph.c
View File

@@ -7,17 +7,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
@@ -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:

11
graph.h
View File

@@ -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