summaryrefslogtreecommitdiffabout
path: root/cgit.h
Side-by-side diff
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/cgit.h b/cgit.h
index e3d9cb8..f8f0316 100644
--- a/cgit.h
+++ b/cgit.h
@@ -30,2 +30,3 @@
#define CMD_TAG 7
+#define CMD_REFS 8
@@ -100,2 +101,17 @@ struct taginfo {
+struct refinfo {
+ const char *refname;
+ struct object *object;
+ union {
+ struct taginfo *tag;
+ struct commitinfo *commit;
+ };
+};
+
+struct reflist {
+ struct refinfo **refs;
+ int alloc;
+ int count;
+};
+
extern const char *cgit_version;
@@ -130,2 +146,4 @@ extern int cgit_cache_max_create_time;
extern int cgit_summary_log;
+extern int cgit_summary_tags;
+extern int cgit_summary_branches;
@@ -164,2 +182,6 @@ extern char *trim_end(const char *str, char c);
+extern void cgit_add_ref(struct reflist *list, struct refinfo *ref);
+extern int cgit_refs_cb(const char *refname, const unsigned char *sha1,
+ int flags, void *cb_data);
+
extern void *cgit_free_commitinfo(struct commitinfo *info);
@@ -172,3 +194,3 @@ extern void cgit_diff_tree(const unsigned char *old_sha1,
const unsigned char *new_sha1,
- filepair_fn fn);
+ filepair_fn fn, const char *prefix);
@@ -216,2 +238,4 @@ extern void cgit_commit_link(char *name, char *title, char *class, char *head,
char *rev);
+extern void cgit_refs_link(char *name, char *title, char *class, char *head,
+ char *rev, char *path);
extern void cgit_snapshot_link(char *name, char *title, char *class,
@@ -232,2 +256,4 @@ extern void cgit_print_snapshot_start(const char *mimetype,
struct cacheitem *item);
+extern void cgit_print_branches(int maxcount);
+extern void cgit_print_tags(int maxcount);
@@ -239,4 +265,5 @@ extern void cgit_print_tree(const char *rev, char *path);
extern void cgit_print_commit(char *hex);
+extern void cgit_print_refs();
extern void cgit_print_tag(char *revname);
-extern void cgit_print_diff(const char *new_hex, const char *old_hex);
+extern void cgit_print_diff(const char *new_hex, const char *old_hex, const char *prefix);
extern void cgit_print_snapshot(struct cacheitem *item, const char *head,