Diff options
Diffstat (limited to 'source/ui-shared.h')
| -rw-r--r-- | source/ui-shared.h | 14 |
1 file changed, 14 insertions, 0 deletions
diff --git a/source/ui-shared.h b/source/ui-shared.h index fb02d7b..871dba0 100644 --- a/source/ui-shared.h +++ b/source/ui-shared.h @@ -121,6 +121,20 @@ extern void cgit_print_error_page(int code, const char *msg, const char *fmt, .. * Answer with the error page for a blob of size bytes past max-blob-size. */ extern void cgit_print_blob_too_large(size_t size); + +/* + * Resolve rev to the parsed commit it names, peeling a tag, with oid set to + * what rev itself names. Returns NULL once the 404 page naming rev is out. + */ +extern struct commit *cgit_get_commit(const char *rev, struct object_id *oid); + +/* + * Fill oid with the older end of a comparison with commit, which is what + * old_rev names when it is given, else commit's first parent, else the null + * id for a root commit. Returns -1 once the 404 page for old_rev is out. + */ +extern int cgit_get_old_oid(const char *old_rev, const struct commit *commit, struct object_id *oid); + extern void cgit_print_filemode(unsigned short mode); extern void cgit_print_snapshot_links(const struct cgit_repo *repo, const char *ref, const char *separator); |
