Diff options
Diffstat (limited to 'source/ui-shared.h')
-rw-r--r--source/ui-shared.h7
1 file changed, 7 insertions, 0 deletions
diff --git a/source/ui-shared.h b/source/ui-shared.h
index fa8d8dd..87f9c60 100644
--- a/source/ui-shared.h
+++ b/source/ui-shared.h
@@ -142,6 +142,13 @@ extern int cgit_get_old_oid(const char *old_rev, const struct commit *commit, st
*/
extern int cgit_prepare_walk(struct rev_info *rev);
+/*
+ * Refuse a path with a leading colon, printing the 400 page. git reads such a
+ * path as a pathspec with magic, which can end the request inside git.
+ * Returns non-zero when the path was refused.
+ */
+extern int cgit_refuse_pathspec_magic(const char *path);
+
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);