summaryrefslogtreecommitdiffabout
path: root/cgit.h
authorJohan Herland <johan@herland.net>2010-11-15 17:39:50 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-11-16 07:18:36 (UTC)
commit9a8d39c668b98464bac97d4e5442966de63f97b2 (patch) (unidiff)
treeee1a7766d6d9365ae45f694939c20cab811abd84 /cgit.h
parent5a36c2a291a00b59b8ec2f112453e117797c2fe5 (diff)
downloadcgit-9a8d39c668b98464bac97d4e5442966de63f97b2.zip
cgit-9a8d39c668b98464bac97d4e5442966de63f97b2.tar.gz
cgit-9a8d39c668b98464bac97d4e5442966de63f97b2.tar.bz2
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>
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index f5f68ac..bed770b 100644
--- a/cgit.h
+++ b/cgit.h
@@ -17,12 +17,13 @@
17#include <archive.h> 17#include <archive.h>
18#include <string-list.h> 18#include <string-list.h>
19#include <xdiff-interface.h> 19#include <xdiff-interface.h>
20#include <xdiff/xdiff.h> 20#include <xdiff/xdiff.h>
21#include <utf8.h> 21#include <utf8.h>
22#include <notes.h> 22#include <notes.h>
23#include <graph.h>
23 24
24 25
25/* 26/*
26 * Dateformats used on misc. pages 27 * Dateformats used on misc. pages
27 */ 28 */
28#define FMT_LONGDATE "%Y-%m-%d %H:%M:%S (%Z)" 29#define FMT_LONGDATE "%Y-%m-%d %H:%M:%S (%Z)"
@@ -68,12 +69,13 @@ struct cgit_repo {
68 char *defbranch; 69 char *defbranch;
69 char *module_link; 70 char *module_link;
70 char *readme; 71 char *readme;
71 char *section; 72 char *section;
72 char *clone_url; 73 char *clone_url;
73 int snapshots; 74 int snapshots;
75 int enable_commit_graph;
74 int enable_log_filecount; 76 int enable_log_filecount;
75 int enable_log_linecount; 77 int enable_log_linecount;
76 int enable_remote_branches; 78 int enable_remote_branches;
77 int enable_subject_links; 79 int enable_subject_links;
78 int max_stats; 80 int max_stats;
79 time_t mtime; 81 time_t mtime;
@@ -185,12 +187,13 @@ struct cgit_config {
185 int cache_scanrc_ttl; 187 int cache_scanrc_ttl;
186 int cache_static_ttl; 188 int cache_static_ttl;
187 int embedded; 189 int embedded;
188 int enable_filter_overrides; 190 int enable_filter_overrides;
189 int enable_gitweb_owner; 191 int enable_gitweb_owner;
190 int enable_index_links; 192 int enable_index_links;
193 int enable_commit_graph;
191 int enable_log_filecount; 194 int enable_log_filecount;
192 int enable_log_linecount; 195 int enable_log_linecount;
193 int enable_remote_branches; 196 int enable_remote_branches;
194 int enable_subject_links; 197 int enable_subject_links;
195 int enable_tree_linenumbers; 198 int enable_tree_linenumbers;
196 int local_time; 199 int local_time;