From 80767bc9732bf6716697198e53ff2cb8d4ae96be Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 12 Aug 2026 18:23:17 -1000 Subject: Restyle the sources and fix the audit's findings --- source/ui-diff.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'source/ui-diff.h') diff --git a/source/ui-diff.h b/source/ui-diff.h index 39264a1..67d33ba 100644 --- a/source/ui-diff.h +++ b/source/ui-diff.h @@ -1,5 +1,19 @@ -#ifndef UI_DIFF_H -#define UI_DIFF_H +/* + * The page that shows what one revision changed against another, and the + * options panel that sits above it. The side by side renderer in ui-ssdiff + * builds a link on every line number, so the two revisions being compared and + * the file pair being rendered are published here for it rather than kept + * private to the page. + */ + +#ifndef CGIT_UI_DIFF_H +#define CGIT_UI_DIFF_H + +#include "cgit.h" + +// Widest context the options panel offers, and so the widest a request may +// ask for, since the query string is clamped against it before the page runs. +#define MAX_DIFF_CONTEXT_LINES 40 extern void cgit_print_diff_ctrls(void); @@ -12,4 +26,4 @@ extern struct diff_filespec *cgit_get_current_new_file(void); extern struct object_id old_rev_oid[1]; extern struct object_id new_rev_oid[1]; -#endif /* UI_DIFF_H */ +#endif // CGIT_UI_DIFF_H -- cgit v2.8.0