summaryrefslogtreecommitdiffabout
path: root/cgit.h
authorLars Hjemli <hjemli@gmail.com>2006-12-15 17:17:36 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2006-12-15 17:17:36 (UTC)
commit2101e26fd68f816e77de62b93df4c32fd1110d0c (patch) (side-by-side diff)
treed70d28734c4fbfd0a4e4a40bcfd445eb50dc1666 /cgit.h
parent420712ac2531f65a2b94d5ec6d8e03de6942331e (diff)
downloadcgit-2101e26fd68f816e77de62b93df4c32fd1110d0c.zip
cgit-2101e26fd68f816e77de62b93df4c32fd1110d0c.tar.gz
cgit-2101e26fd68f816e77de62b93df4c32fd1110d0c.tar.bz2
Add a common commit parser
Make a better commit parser, replacing the ugly one in ui-log.c Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index 82e8681..268db53 100644
--- a/cgit.h
+++ b/cgit.h
@@ -10,16 +10,24 @@ typedef void (*configfn)(const char *name, const char *value);
struct cacheitem {
char *name;
struct stat st;
int ttl;
int fd;
};
+struct commitinfo {
+ struct commit *commit;
+ char *author;
+ char *committer;
+ char *subject;
+ char *msg;
+};
+
extern const char cgit_version[];
extern char *cgit_root;
extern char *cgit_root_title;
extern char *cgit_css;
extern char *cgit_logo;
extern char *cgit_logo_link;
extern char *cgit_virtual_root;
@@ -58,16 +66,17 @@ extern void html(const char *txt);
extern void htmlf(const char *format,...);
extern void html_txt(char *txt);
extern void html_attr(char *txt);
extern void html_link_open(char *url, char *title, char *class);
extern void html_link_close(void);
extern int cgit_read_config(const char *filename, configfn fn);
extern int cgit_parse_query(char *txt, configfn fn);
+extern struct commitinfo *cgit_parse_commit(struct commit *commit);
extern void cache_prepare(struct cacheitem *item);
extern int cache_lock(struct cacheitem *item);
extern int cache_unlock(struct cacheitem *item);
extern int cache_cancel_lock(struct cacheitem *item);
extern int cache_exist(struct cacheitem *item);
extern int cache_expired(struct cacheitem *item);