diff options
author | Adam Simpkins <adam@adamsimpkins.net> | 2008-05-04 03:36:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-05 18:46:35 -0700 |
commit | 7fefda5cc7a5faf7962092367bedb321a634d54d (patch) | |
tree | b52dbe550af5064d586abfc07f2a0f61f31f7b73 /Documentation/technical | |
parent | Add history graph API (diff) | |
download | tgif-7fefda5cc7a5faf7962092367bedb321a634d54d.tar.xz |
log and rev-list: add --graph option
This new option causes a text-based representation of the history to be
printed to the left of the normal output.
Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
-rw-r--r-- | Documentation/technical/api-history-graph.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Documentation/technical/api-history-graph.txt b/Documentation/technical/api-history-graph.txt index 5f6465fa25..ce1c08ee86 100644 --- a/Documentation/technical/api-history-graph.txt +++ b/Documentation/technical/api-history-graph.txt @@ -74,14 +74,17 @@ state. Calling sequence ---------------- -* Create a `struct git_graph` by calling `graph_init()`. +* Create a `struct git_graph` by calling `graph_init()`. When using the + revision walking API, this is done automatically by `setup_revisions()` if + the '--graph' option is supplied. * Use the revision walking API to walk through a group of contiguous commits. + The `get_revision()` function automatically calls `graph_update()` each time + it is invoked. -* For each commit traversed, call `graph_update()` to move the graph to the - next commit. Once `graph_update()` has been called, call `graph_next_line()` - repeatedly, until `graph_is_commit_finished()` returns non-zero. Each call - to `graph_next_line()` will output a single line of the graph. The resulting +* For each commit, call `graph_next_line()` repeatedly, until + `graph_is_commit_finished()` returns non-zero. Each call go + `graph_next_line()` will output a single line of the graph. The resulting lines will not contain any newlines. `graph_next_line()` returns 1 if the resulting line contains the current commit, or 0 if this is merely a line needed to adjust the graph before or after the current commit. This return |