about summary refs log tree commit diff stats
path: root/ui-shared.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-shared.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-shared.c')
-rw-r--r--ui-shared.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/ui-shared.c b/ui-shared.c index d2358f2..151ac17 100644 --- a/ui-shared.c +++ b/ui-shared.c
@@ -521,45 +521,45 @@ static void cgit_self_link(char *name, const char *title, const char *class)
521 else if (!strcmp(ctx.qry.page, "summary")) 521 else if (!strcmp(ctx.qry.page, "summary"))
522 cgit_summary_link(name, title, class, ctx.qry.head); 522 cgit_summary_link(name, title, class, ctx.qry.head);
523 else if (!strcmp(ctx.qry.page, "tag")) 523 else if (!strcmp(ctx.qry.page, "tag"))
524 cgit_tag_link(name, title, class, ctx.qry.has_sha1 ? 524 cgit_tag_link(name, title, class, ctx.qry.has_oid ?
525 ctx.qry.sha1 : ctx.qry.head); 525 ctx.qry.oid : ctx.qry.head);
526 else if (!strcmp(ctx.qry.page, "tree")) 526 else if (!strcmp(ctx.qry.page, "tree"))
527 cgit_tree_link(name, title, class, ctx.qry.head, 527 cgit_tree_link(name, title, class, ctx.qry.head,
528 ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, 528 ctx.qry.has_oid ? ctx.qry.oid : NULL,
529 ctx.qry.path); 529 ctx.qry.path);
530 else if (!strcmp(ctx.qry.page, "plain")) 530 else if (!strcmp(ctx.qry.page, "plain"))
531 cgit_plain_link(name, title, class, ctx.qry.head, 531 cgit_plain_link(name, title, class, ctx.qry.head,
532 ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, 532 ctx.qry.has_oid ? ctx.qry.oid : NULL,
533 ctx.qry.path); 533 ctx.qry.path);
534 else if (!strcmp(ctx.qry.page, "blame")) 534 else if (!strcmp(ctx.qry.page, "blame"))
535 cgit_blame_link(name, title, class, ctx.qry.head, 535 cgit_blame_link(name, title, class, ctx.qry.head,
536 ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, 536 ctx.qry.has_oid ? ctx.qry.oid : NULL,
537 ctx.qry.path); 537 ctx.qry.path);
538 else if (!strcmp(ctx.qry.page, "log")) 538 else if (!strcmp(ctx.qry.page, "log"))
539 cgit_log_link(name, title, class, ctx.qry.head, 539 cgit_log_link(name, title, class, ctx.qry.head,
540 ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, 540 ctx.qry.has_oid ? ctx.qry.oid : NULL,
541 ctx.qry.path, ctx.qry.ofs, 541 ctx.qry.path, ctx.qry.ofs,
542 ctx.qry.grep, ctx.qry.search, 542 ctx.qry.grep, ctx.qry.search,
543 ctx.qry.showmsg, ctx.qry.follow); 543 ctx.qry.showmsg, ctx.qry.follow);
544 else if (!strcmp(ctx.qry.page, "commit")) 544 else if (!strcmp(ctx.qry.page, "commit"))
545 cgit_commit_link(name, title, class, ctx.qry.head, 545 cgit_commit_link(name, title, class, ctx.qry.head,
546 ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, 546 ctx.qry.has_oid ? ctx.qry.oid : NULL,
547 ctx.qry.path); 547 ctx.qry.path);
548 else if (!strcmp(ctx.qry.page, "patch")) 548 else if (!strcmp(ctx.qry.page, "patch"))
549 cgit_patch_link(name, title, class, ctx.qry.head, 549 cgit_patch_link(name, title, class, ctx.qry.head,
550 ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, 550 ctx.qry.has_oid ? ctx.qry.oid : NULL,
551 ctx.qry.path); 551 ctx.qry.path);
552 else if (!strcmp(ctx.qry.page, "refs")) 552 else if (!strcmp(ctx.qry.page, "refs"))
553 cgit_refs_link(name, title, class, ctx.qry.head, 553 cgit_refs_link(name, title, class, ctx.qry.head,
554 ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, 554 ctx.qry.has_oid ? ctx.qry.oid : NULL,
555 ctx.qry.path); 555 ctx.qry.path);
556 else if (!strcmp(ctx.qry.page, "snapshot")) 556 else if (!strcmp(ctx.qry.page, "snapshot"))
557 cgit_snapshot_link(name, title, class, ctx.qry.head, 557 cgit_snapshot_link(name, title, class, ctx.qry.head,
558 ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL, 558 ctx.qry.has_oid ? ctx.qry.oid : NULL,
559 ctx.qry.path); 559 ctx.qry.path);
560 else if (!strcmp(ctx.qry.page, "diff")) 560 else if (!strcmp(ctx.qry.page, "diff"))
561 cgit_diff_link(name, title, class, ctx.qry.head, 561 cgit_diff_link(name, title, class, ctx.qry.head,
562 ctx.qry.sha1, ctx.qry.sha2, 562 ctx.qry.oid, ctx.qry.oid2,
563 ctx.qry.path); 563 ctx.qry.path);
564 else if (!strcmp(ctx.qry.page, "stats")) 564 else if (!strcmp(ctx.qry.page, "stats"))
565 cgit_stats_link(name, title, class, ctx.qry.head, 565 cgit_stats_link(name, title, class, ctx.qry.head,
@@ -918,10 +918,10 @@ void cgit_add_hidden_formfields(int incl_head, int incl_search,
918 strcmp(ctx.qry.head, ctx.repo->defbranch)) 918 strcmp(ctx.qry.head, ctx.repo->defbranch))
919 html_hidden("h", ctx.qry.head); 919 html_hidden("h", ctx.qry.head);
920 920
921 if (ctx.qry.sha1) 921 if (ctx.qry.oid)
922 html_hidden("id", ctx.qry.sha1); 922 html_hidden("id", ctx.qry.oid);
923 if (ctx.qry.sha2) 923 if (ctx.qry.oid2)
924 html_hidden("id2", ctx.qry.sha2); 924 html_hidden("id2", ctx.qry.oid2);
925 if (ctx.qry.showmsg) 925 if (ctx.qry.showmsg)
926 html_hidden("showmsg", "1"); 926 html_hidden("showmsg", "1");
927 927
@@ -1038,20 +1038,20 @@ void cgit_print_pageheader(void)
1038 cgit_summary_link("summary", NULL, hc("summary"), 1038 cgit_summary_link("summary", NULL, hc("summary"),
1039 ctx.qry.head); 1039 ctx.qry.head);
1040 cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head, 1040 cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head,
1041 ctx.qry.sha1, NULL); 1041 ctx.qry.oid, NULL);
1042 cgit_log_link("log", NULL, hc("log"), ctx.qry.head, 1042 cgit_log_link("log", NULL, hc("log"), ctx.qry.head,
1043 NULL, ctx.qry.vpath, 0, NULL, NULL, 1043 NULL, ctx.qry.vpath, 0, NULL, NULL,
1044 ctx.qry.showmsg, ctx.qry.follow); 1044 ctx.qry.showmsg, ctx.qry.follow);
1045 if (ctx.qry.page && !strcmp(ctx.qry.page, "blame")) 1045 if (ctx.qry.page && !strcmp(ctx.qry.page, "blame"))
1046 cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head, 1046 cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head,
1047 ctx.qry.sha1, ctx.qry.vpath); 1047 ctx.qry.oid, ctx.qry.vpath);
1048 else 1048 else
1049 cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head, 1049 cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head,
1050 ctx.qry.sha1, ctx.qry.vpath); 1050 ctx.qry.oid, ctx.qry.vpath);
1051 cgit_commit_link("commit", NULL, hc("commit"), 1051 cgit_commit_link("commit", NULL, hc("commit"),
1052 ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); 1052 ctx.qry.head, ctx.qry.oid, ctx.qry.vpath);
1053 cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head, 1053 cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head,
1054 ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath); 1054 ctx.qry.oid, ctx.qry.oid2, ctx.qry.vpath);
1055 if (ctx.repo->max_stats) 1055 if (ctx.repo->max_stats)
1056 cgit_stats_link("stats", NULL, hc("stats"), 1056 cgit_stats_link("stats", NULL, hc("stats"),
1057 ctx.qry.head, ctx.qry.vpath); 1057 ctx.qry.head, ctx.qry.vpath);