about summary refs log tree commit diff stats
path: root/ui-commit.c
diff options
context:
space:
mode:
authorChristian Hesse2020-10-20 23:32:45 +0200
committerChristian Hesse2020-10-20 23:57:12 +0200
commit779631c6dc23c15bbbf45a7c7ab9fffb619037b7 (patch)
tree99ddcae06134e97ef490fb1a4c9f6ab095ca5052 /ui-commit.c
parentgit: update to v2.29.0 (diff)
downloadcgit-779631c6dc23c15bbbf45a7c7ab9fffb619037b7.tar.gz
cgit-779631c6dc23c15bbbf45a7c7ab9fffb619037b7.zip
global: replace references to 'sha1' with 'oid'
For some time now sha1 is considered broken and upstream is working to
replace it with sha256. Replace all references to 'sha1' with 'oid',
just as upstream does.

Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'ui-commit.c')
-rw-r--r--ui-commit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui-commit.c b/ui-commit.c index 783211f..948118c 100644 --- a/ui-commit.c +++ b/ui-commit.c
@@ -70,13 +70,13 @@ void cgit_print_commit(char *hex, const char *prefix)
70 html_txt(show_date(info->committer_date, info->committer_tz, 70 html_txt(show_date(info->committer_date, info->committer_tz,
71 cgit_date_mode(DATE_ISO8601))); 71 cgit_date_mode(DATE_ISO8601)));
72 html("</td></tr>\n"); 72 html("</td></tr>\n");
73 html("<tr><th>commit</th><td colspan='2' class='sha1'>"); 73 html("<tr><th>commit</th><td colspan='2' class='oid'>");
74 tmp = oid_to_hex(&commit->object.oid); 74 tmp = oid_to_hex(&commit->object.oid);
75 cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix); 75 cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix);
76 html(" ("); 76 html(" (");
77 cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix); 77 cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix);
78 html(")</td></tr>\n"); 78 html(")</td></tr>\n");
79 html("<tr><th>tree</th><td colspan='2' class='sha1'>"); 79 html("<tr><th>tree</th><td colspan='2' class='oid'>");
80 tmp = xstrdup(hex); 80 tmp = xstrdup(hex);
81 cgit_tree_link(oid_to_hex(get_commit_tree_oid(commit)), NULL, NULL, 81 cgit_tree_link(oid_to_hex(get_commit_tree_oid(commit)), NULL, NULL,
82 ctx.qry.head, tmp, NULL); 82 ctx.qry.head, tmp, NULL);
@@ -95,7 +95,7 @@ void cgit_print_commit(char *hex, const char *prefix)
95 continue; 95 continue;
96 } 96 }
97 html("<tr><th>parent</th>" 97 html("<tr><th>parent</th>"
98 "<td colspan='2' class='sha1'>"); 98 "<td colspan='2' class='oid'>");
99 tmp = tmp2 = oid_to_hex(&p->item->object.oid); 99 tmp = tmp2 = oid_to_hex(&p->item->object.oid);
100 if (ctx.repo->enable_subject_links) { 100 if (ctx.repo->enable_subject_links) {
101 parent_info = cgit_parse_commit(parent); 101 parent_info = cgit_parse_commit(parent);
@@ -109,7 +109,7 @@ void cgit_print_commit(char *hex, const char *prefix)
109 parents++; 109 parents++;
110 } 110 }
111 if (ctx.repo->snapshots) { 111 if (ctx.repo->snapshots) {
112 html("<tr><th>download</th><td colspan='2' class='sha1'>"); 112 html("<tr><th>download</th><td colspan='2' class='oid'>");
113 cgit_print_snapshot_links(ctx.repo, hex, "<br/>"); 113 cgit_print_snapshot_links(ctx.repo, hex, "<br/>");
114 html("</td></tr>"); 114 html("</td></tr>");
115 } 115 }
@@ -139,7 +139,7 @@ void cgit_print_commit(char *hex, const char *prefix)
139 tmp = oid_to_hex(&commit->parents->item->object.oid); 139 tmp = oid_to_hex(&commit->parents->item->object.oid);
140 else 140 else
141 tmp = NULL; 141 tmp = NULL;
142 cgit_print_diff(ctx.qry.sha1, tmp, prefix, 0, 0); 142 cgit_print_diff(ctx.qry.oid, tmp, prefix, 0, 0);
143 } 143 }
144 strbuf_release(&notes); 144 strbuf_release(&notes);
145 cgit_free_commitinfo(info); 145 cgit_free_commitinfo(info);