mirror of
https://git.zx2c4.com/cgit
synced 2025-08-03 17:44:27 +02:00
ui-log: Implement support for commit graphs
Teach CGit to print an ASCII art commit graph to the left of the commit message, similar to 'git log --graph'. The graph adds extra lines (table rows) to the log when needed to add/remove/shuffle edges in the graph. When 'showmsg' is enabled, the graph is automatically padded to account for the extra lines added by the commit message/notes. This feature is controlled by a new config variable: "enable-commit-graph" (disabled by default), and individual repos can control it by setting "repo.enable-commit-graph". Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
5a36c2a291
commit
9a8d39c668
6 changed files with 114 additions and 25 deletions
3
cgit.h
3
cgit.h
|
@ -20,6 +20,7 @@
|
|||
#include <xdiff/xdiff.h>
|
||||
#include <utf8.h>
|
||||
#include <notes.h>
|
||||
#include <graph.h>
|
||||
|
||||
|
||||
/*
|
||||
|
@ -71,6 +72,7 @@ struct cgit_repo {
|
|||
char *section;
|
||||
char *clone_url;
|
||||
int snapshots;
|
||||
int enable_commit_graph;
|
||||
int enable_log_filecount;
|
||||
int enable_log_linecount;
|
||||
int enable_remote_branches;
|
||||
|
@ -188,6 +190,7 @@ struct cgit_config {
|
|||
int enable_filter_overrides;
|
||||
int enable_gitweb_owner;
|
||||
int enable_index_links;
|
||||
int enable_commit_graph;
|
||||
int enable_log_filecount;
|
||||
int enable_log_linecount;
|
||||
int enable_remote_branches;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue