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) (side-by-side diff)
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
@@ -11,24 +11,25 @@
#include <tag.h>
#include <diff.h>
#include <diffcore.h>
#include <refs.h>
#include <revision.h>
#include <log-tree.h>
#include <archive.h>
#include <string-list.h>
#include <xdiff-interface.h>
#include <xdiff/xdiff.h>
#include <utf8.h>
#include <notes.h>
+#include <graph.h>
/*
* Dateformats used on misc. pages
*/
#define FMT_LONGDATE "%Y-%m-%d %H:%M:%S (%Z)"
#define FMT_SHORTDATE "%Y-%m-%d"
#define FMT_ATOMDATE "%Y-%m-%dT%H:%M:%SZ"
/*
* Limits used for relative dates
@@ -62,24 +63,25 @@ struct cgit_filter {
struct cgit_repo {
char *url;
char *name;
char *path;
char *desc;
char *owner;
char *defbranch;
char *module_link;
char *readme;
char *section;
char *clone_url;
int snapshots;
+ int enable_commit_graph;
int enable_log_filecount;
int enable_log_linecount;
int enable_remote_branches;
int enable_subject_links;
int max_stats;
time_t mtime;
struct cgit_filter *about_filter;
struct cgit_filter *commit_filter;
struct cgit_filter *source_filter;
};
typedef void (*repo_config_fn)(struct cgit_repo *repo, const char *name,
@@ -179,24 +181,25 @@ struct cgit_config {
char *strict_export;
int cache_size;
int cache_dynamic_ttl;
int cache_max_create_time;
int cache_repo_ttl;
int cache_root_ttl;
int cache_scanrc_ttl;
int cache_static_ttl;
int embedded;
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;
int enable_subject_links;
int enable_tree_linenumbers;
int local_time;
int max_atom_items;
int max_repo_count;
int max_commit_count;
int max_lock_attempts;
int max_msg_len;
int max_repodesc_len;