Diff options
Diffstat (limited to '')
-rw-r--r--source/shared.h27
1 file changed, 13 insertions, 14 deletions
diff --git a/source/shared.h b/source/shared.h
index 4359bef..302b752 100644
--- a/source/shared.h
+++ b/source/shared.h
@@ -1,9 +1,8 @@
/*
- * The helpers that belong to no single page. Repository registration, the
- * lifetimes of the reference and commit records the renderers build, thin
- * wrappers over git's diff machinery, and a handful of string, date and
- * mimetype utilities all live here because several renderers need them. The
- * two process-wide globals, ctx and cgit_repolist, are defined here as well.
+ * The helpers that more than one file needs. Repository registration and thin
+ * wrappers over git's diff machinery make up most of it, beside a few string
+ * and request checks. The two process-wide globals, ctx and cgit_repolist,
+ * are defined here as well.
*/
#ifndef CGIT_SHARED_H
@@ -42,6 +41,15 @@ extern int cgit_diff_files(const struct object_id *old_oid, const struct object_
linediff_fn fn);
/*
+ * Limit a diff to the paths below prefix, which is taken literally.
+ */
+extern void cgit_diff_limit_path(struct diff_options *opt, const char *prefix);
+
+extern void cgit_diff_tree(const struct object_id *old_oid, const struct object_id *new_oid,
+ filepair_fn fn, const char *prefix, int ignorews);
+extern void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix);
+
+/*
* Whether a blob of size bytes is past max-blob-size. Callers ask before
* reading the object, so a huge blob stays out of memory rather than being
* noticed once it is already there.
@@ -55,15 +63,6 @@ extern int cgit_blob_too_large(size_t size);
extern void cgit_literal_pathspec(struct pathspec *ps, struct pathspec_item *item, const char *path);
/*
- * Limit a diff to the paths below prefix, which is taken literally.
- */
-extern void cgit_diff_limit_path(struct diff_options *opt, const char *prefix);
-
-extern void cgit_diff_tree(const struct object_id *old_oid, const struct object_id *new_oid,
- filepair_fn fn, const char *prefix, int ignorews);
-extern void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix);
-
-/*
* Copy str without its trailing runs of c, returning NULL if nothing is left.
*/
extern char *cgit_trim_end(const char *str, char c);