Thread (8 messages) flat view 8 messages, 5 authors, 2016-06-15

Re: [PATCH 1/3] make-static: master

From: Thomas Rast <hidden>
Date: 2016-06-15 22:52:02

Junio C Hamano wrote:
quoted hunk ↗ jump to hunk
diff --git a/graph.h b/graph.h
[...]
quoted hunk ↗ jump to hunk
@@ -50,18 +33,6 @@ 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);
Well, you removed that, but you still have

  /*
   * Determine if a graph has finished outputting lines for the current
   * commit.
   *
   * Returns 1 if graph_next_line() needs to be called again before
   * graph_update() should be called.  Returns 0 if no more lines are needed
   * for this commit.  If 0 is returned, graph_next_line() may still be
   * called without calling graph_update(), and it will merely output
   * appropriate "vertical padding" in the graph.
   */
  int graph_is_commit_finished(struct git_graph const *graph);

which pretty explicitly tells the user to call graph_next_line in
conjunction with graph_update, even though we currently don't have any
callers outside graph.c doing that.

(I can't really say whether the API would be better off without
graph_next_line exposed; I just noticed because I drag along the
line-log stuff and it uses graph_next_line.)

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help