about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui-diff.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ui-diff.c b/ui-diff.c
index 1c182aa..7ab1e49 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -16,7 +16,6 @@ unsigned char new_rev_sha1[20];
 static int files, slots;
 static int total_adds, total_rems, max_changes;
 static int lines_added, lines_removed;
-static char *curr_rev;
 
 static struct fileinfo {
 	char status;
@@ -80,8 +79,8 @@ static void print_fileinfo(struct fileinfo *info)
 		html("]</span>");
 	}
 	htmlf("</td><td class='%s'>", class);
-	cgit_diff_link(info->new_path, NULL, NULL, ctx.qry.head, curr_rev,
-		       NULL, info->new_path);
+	cgit_diff_link(info->new_path, NULL, NULL, ctx.qry.head, ctx.qry.sha1,
+		       ctx.qry.sha2, info->new_path);
 	if (info->status == DIFF_STATUS_COPIED || info->status == DIFF_STATUS_RENAMED)
 		htmlf(" (%s from %s)",
 		      info->status == DIFF_STATUS_COPIED ? "copied" : "renamed",
@@ -145,7 +144,6 @@ void cgit_print_diffstat(const unsigned char *old_sha1,
 	html("<div class='diffstat-header'>Diffstat</div>");
 	html("<table summary='diffstat' class='diffstat'>");
 	max_changes = 0;
-	curr_rev = xstrdup(sha1_to_hex(new_sha1));
 	cgit_diff_tree(old_sha1, new_sha1, inspect_filepair, NULL);
 	for(i = 0; i<files; i++)
 		print_fileinfo(&items[i]);
in/bri.c?id=231a8cbfecb0669384ff3e30c47edb1f3e0512a3&follow=1'>Clean up error strings in briJune McEnroe 2017-03-18Add -u option to xxJune McEnroe 2017-03-15Fix non-string-literal-format-string in briJune McEnroe 2017-03-15Fix bri compilationJune McEnroe 2017-03-15Use psvar for title settingJune McEnroe 2017-03-14Add bri brightness control scriptJune McEnroe 2017-03-14Add comment to tmux terminal overrideJune McEnroe 2017-03-13Have tmux set block cursor on linux consoleJune McEnroe 2017-03-13Use inverse for Visual in colorschemeJune McEnroe