diff options
Diffstat (limited to 'ui-ssdiff.c')
-rw-r--r-- | ui-ssdiff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-ssdiff.c b/ui-ssdiff.c index d183d40..16c812f 100644 --- a/ui-ssdiff.c +++ b/ui-ssdiff.c | |||
@@ -229,7 +229,7 @@ static void print_ssdiff_line(char *class, | |||
229 | if (old_line_no > 0) { | 229 | if (old_line_no > 0) { |
230 | struct diff_filespec *old_file = cgit_get_current_old_file(); | 230 | struct diff_filespec *old_file = cgit_get_current_old_file(); |
231 | char *lineno_str = fmt("n%d", old_line_no); | 231 | char *lineno_str = fmt("n%d", old_line_no); |
232 | char *id_str = fmt("id=%s#%s", is_null_sha1(old_file->sha1)?"HEAD":sha1_to_hex(old_rev_sha1), lineno_str); | 232 | char *id_str = fmt("id=%s#%s", is_null_oid(&old_file->oid)?"HEAD":oid_to_hex(old_rev_oid), lineno_str); |
233 | char *fileurl = cgit_fileurl(ctx.repo->url, "tree", old_file->path, id_str); | 233 | char *fileurl = cgit_fileurl(ctx.repo->url, "tree", old_file->path, id_str); |
234 | html("<td class='lineno'><a href='"); | 234 | html("<td class='lineno'><a href='"); |
235 | html(fileurl); | 235 | html(fileurl); |
@@ -252,7 +252,7 @@ static void print_ssdiff_line(char *class, | |||
252 | if (new_line_no > 0) { | 252 | if (new_line_no > 0) { |
253 | struct diff_filespec *new_file = cgit_get_current_new_file(); | 253 | struct diff_filespec *new_file = cgit_get_current_new_file(); |
254 | char *lineno_str = fmt("n%d", new_line_no); | 254 | char *lineno_str = fmt("n%d", new_line_no); |
255 | char *id_str = fmt("id=%s#%s", is_null_sha1(new_file->sha1)?"HEAD":sha1_to_hex(new_rev_sha1), lineno_str); | 255 | char *id_str = fmt("id=%s#%s", is_null_oid(&new_file->oid)?"HEAD":oid_to_hex(new_rev_oid), lineno_str); |
256 | char *fileurl = cgit_fileurl(ctx.repo->url, "tree", new_file->path, id_str); | 256 | char *fileurl = cgit_fileurl(ctx.repo->url, "tree", new_file->path, id_str); |
257 | html("<td class='lineno'><a href='"); | 257 | html("<td class='lineno'><a href='"); |
258 | html(fileurl); | 258 | html(fileurl); |