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

[PATCH 0/2] Preparing the graph API for external users

From
Johan Herland <johan@herland.net>
Date
Jul 13, 2010, 21:23 UTC
Message-ID
<1279056219-27096-1-git-send-email-johan@herland.net>
Hi,

I'm playing around with some CGit patches for enabling an ASCII-art commit graph to be displayed on CGit's 'log' page. These patches reuse the ASCII-art commit graph that is produced by 'git log --graph'.

However, in order to allow proper reuse by CGit, I need to make a couple of changes to the graph API:

The first patch exposes graph_next_line() in the graph.h API. This function is needed to drive the graph generation from CGit. (Since the graph_show_* functions print directly to stdout, they can not be used by CGit.)

The second patch allows CGit to use a different coloring mechanism than the default ANSI color escapes in graph.c. CGit replaces the column_colors array of ANSI escapes in graph.c with its own array that contains HTML <span> tags (which are then styled to the appropriate colors using CSS).

For reference, the corresponding CGit patches that generate the commit graph on CGit's log page will follow as a separate patch series.

Johan Herland (2):
  Make graph_next_line() available in the graph.h API
  Enable custom schemes for column colors in the graph API
 graph.c |   50 +++++++++++++++++++++++++++-----------------------
 graph.h |   28 ++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 23 deletions(-)
Next: Johan Herland
Message 1 of 12 in “Preparing the graph API for external users”
  1. 0/2 Preparing the graph API for external usersJohan Herland, Jul 13, 2010
  2. 1/2 Make graph_next_line() available in the graph.h APIJohan Herland, Jul 13, 2010
  3. 2/2 Enable custom schemes for column colors in the graph APIJohan Herland, Jul 13, 2010
  4. 0/5 Commit graph on CGit's 'log' viewJohan Herland, Jul 13, 2010
  5. Lars HjemliJul 13, 2010
  6. Johan HerlandJul 14, 2010
  7. Lars HjemliJul 18, 2010
  8. 1/5 ui-stats: Remove unnecessary #includeJohan Herland, Jul 13, 2010
  9. 2/5 ui-log: Move 'Age' column to the right of 'Author', like in gitkJohan Herland, Jul 13, 2010
  10. 3/5 ui-log: Refactor display of commit messagesJohan Herland, Jul 13, 2010
  11. 4/5 ui-log: Implement support for commit graphsJohan Herland, Jul 13, 2010
  12. 5/5 ui-log: Colorize commit graphJohan Herland, Jul 13, 2010

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.