From b9e3ea6a1b3a5fa9a2c2ec8cf9e15870261d9221 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 1 Nov 2026 15:27:07 -1000 Subject: Keep the range in a large diff's patch link The link named only id, so for a diff between two commits it led to a patch of the newer one alone, and without an id it lost the branch as well and led to the default branch's tip. --- source/ui-diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/ui-diff.c') diff --git a/source/ui-diff.c b/source/ui-diff.c index 0e2e75e..1549949 100644 --- a/source/ui-diff.c +++ b/source/ui-diff.c @@ -670,7 +670,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, const char *prefi if (cap_diffs && ctx.cfg.max_diff_files > 0 && files > ctx.cfg.max_diff_files) { html("
"); html("This diff is too large to be rendered inline. Follow a file above, or the "); - cgit_patch_link("patch", NULL, NULL, NULL, ctx.qry.oid, NULL); + cgit_patch_link("patch", NULL, NULL, ctx.qry.head, ctx.qry.oid, ctx.qry.oid2, NULL); html(" link for the whole commit."); html("
"); if (show_ctrls) -- cgit 2.12.1