aboutsummaryrefslogtreecommitdiffstats
path: root/ui-plain.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-plain.c
parent629659d2cffbf059374fc53e6400ff0bebe1ddde (diff)
downloadcgit-779631c6dc23c15bbbf45a7c7ab9fffb619037b7.tar.gz
cgit-779631c6dc23c15bbbf45a7c7ab9fffb619037b7.tar.bz2
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-plain.c')
-rw-r--r--ui-plain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui-plain.c b/ui-plain.c
index 2a7b18c..001001c 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -99,7 +99,7 @@ static void print_dir(const struct object_id *oid, const char *base,
99 fullpath = NULL; 99 fullpath = NULL;
100 } 100 }
101 html("<li>"); 101 html("<li>");
102 cgit_plain_link("../", NULL, NULL, ctx.qry.head, ctx.qry.sha1, 102 cgit_plain_link("../", NULL, NULL, ctx.qry.head, ctx.qry.oid,
103 fullpath); 103 fullpath);
104 html("</li>\n"); 104 html("</li>\n");
105 } 105 }
@@ -118,7 +118,7 @@ static void print_dir_entry(const struct object_id *oid, const char *base,
118 if (S_ISGITLINK(mode)) { 118 if (S_ISGITLINK(mode)) {
119 cgit_submodule_link(NULL, fullpath, oid_to_hex(oid)); 119 cgit_submodule_link(NULL, fullpath, oid_to_hex(oid));
120 } else 120 } else
121 cgit_plain_link(path, NULL, NULL, ctx.qry.head, ctx.qry.sha1, 121 cgit_plain_link(path, NULL, NULL, ctx.qry.head, ctx.qry.oid,
122 fullpath); 122 fullpath);
123 html("</li>\n"); 123 html("</li>\n");
124 free(fullpath); 124 free(fullpath);
@@ -163,7 +163,7 @@ static int basedir_len(const char *path)
163 163
164void cgit_print_plain(void) 164void cgit_print_plain(void)
165{ 165{
166 const char *rev = ctx.qry.sha1; 166 const char *rev = ctx.qry.oid;
167 struct object_id oid; 167 struct object_id oid;
168 struct commit *commit; 168 struct commit *commit;
169 struct pathspec_item path_items = { 169 struct pathspec_item path_items = {