blob: 467c79fdf2322217b76d61ff3458234fcdafdfa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * 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);

extern void cgit_print_diff(const char *new_hex, const char *old_hex, const char *prefix,
	int show_ctrls, int raw);

extern struct diff_filespec *cgit_get_current_old_file(void);
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 // CGIT_UI_DIFF_H