git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Thomas Rast <trast@student.ethz.ch>
Date
Sep 14, 2011, 08:52 UTC
Message-ID
<201109141052.10257.trast@student.ethz.ch>
In-Reply-To
<7vhb4in4j7.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> diff --git a/graph.h b/graph.h
[...]
Show 13 quoted lines
> @@ -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
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 14 in “sparse: Fix some "symbol not declared" warnings”
  1. 1/3 sparse: Fix some "symbol not declared" warningsRamsay Jones, Sep 11, 2011
  2. Junio C HamanoSep 11, 2011
  3. Junio C HamanoSep 12, 2011
  4. 1/3 make-static: masterJunio C Hamano, Sep 11, 2011
  5. Ramkumar RamachandraSep 12, 2011
  6. Junio C HamanoSep 15, 2011
  7. Ramsay JonesSep 13, 2011
  8. Junio C HamanoSep 13, 2011
  9. Johannes SixtSep 14, 2011
  10. Junio C HamanoSep 14, 2011
  11. Junio C HamanoSep 14, 2011
  12. Thomas RastSep 14, 2011
  13. 2/3 make-static: nextJunio C Hamano, Sep 11, 2011
  14. 3/3 make-static: puJunio C Hamano, Sep 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.