From: Adam Simpkins Date: Sun, 30 Mar 2008 19:58:41 GMT Subject: [PATCH] Add new git-graph command Message-ID: <20080330195840.GA8695@adamsimpkins.net> This is a first pass at a command to print a text-based graph of the commit history. It is similar to the history graph shown by gitk, but doesn't require a windowing system. Signed-off-by: Adam Simpkins --- I added this since I really like gitk, but don't always have easy access to an X display on some of the systems I use. I tried using tig, but I found its graph output very hard to read. The graph produced by git-graph is less compact, but much more readable. Ultimately, it would probably be better to integrate this functionality into git-log, instead of having it as a standalone command. For example, a new --graph option could be added to cause the graph to be displayed alongside the existing git log output. However, this would require tighter integration between the graphing code and the log_tree.c and pretty.c code, which I'm not all that familiar with. .gitignore | 1 + Documentation/git-graph.txt | 56 ++++ Documentation/pretty-formats.txt | 4 + Documentation/rev-list-options.txt | 15 + Makefile | 1 + builtin-graph.c | 553 ++++++++++++++++++++++++++++++++++++ builtin.h | 1 + git.c | 1 + 8 files changed, 632 insertions(+), 0 deletions(-) create mode 100644 Documentation/git-graph.txt create mode 100644 builtin-graph.c diff --git a/.gitignore b/.gitignore index 4ff2fec..b9b4c76 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ git-fsck git-fsck-objects git-gc git-get-tar-commit-id +git-graph git-grep git-hash-object git-http-fetch diff --git a/Documentation/git-graph.txt b/Documentation/git-graph.txt new file mode 100644 index 0000000..022cb09 --- /dev/null +++ b/Documentation/git-graph.txt @@ -0,0 +1,56 @@ +git-graph(1) +============ + +NAME +---- +git-graph - Show a graph of commit history + + +SYNOPSIS +-------- +'git-graph'