From 629659d2cffbf059374fc53e6400ff0bebe1ddde Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 6 Oct 2020 16:32:08 +0200 Subject: git: update to v2.29.0 Update to git version v2.29.0, this requires changes for these upstream commits: * dbbcd44fb47347a3fdbee88ea21805b7f4ac0b98 strvec: rename files from argv-array to strvec * 873cd28a8b17ff21908c78c7929a7615f8c94992 argv-array: rename to strvec * d70a9eb611a9d242c1d26847d223b8677609305b strvec: rename struct fields * 6a67c759489e1025665adf78326e9e0d0981bab5 test-lib-functions: restrict test_must_fail usage Signed-off-by: Christian Hesse --- ui-blame.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ui-blame.c') diff --git a/ui-blame.c b/ui-blame.c index f28eea0..c3662bb 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -10,7 +10,7 @@ #include "ui-blame.h" #include "html.h" #include "ui-shared.h" -#include "argv-array.h" +#include "strvec.h" #include "blame.h" @@ -104,7 +104,7 @@ static void print_object(const struct object_id *oid, const char *path, enum object_type type; char *buf; unsigned long size; - struct argv_array rev_argv = ARGV_ARRAY_INIT; + struct strvec rev_argv = STRVEC_INIT; struct rev_info revs; struct blame_scoreboard sb; struct blame_origin *o; @@ -124,11 +124,11 @@ static void print_object(const struct object_id *oid, const char *path, return; } - argv_array_push(&rev_argv, "blame"); - argv_array_push(&rev_argv, rev); + strvec_push(&rev_argv, "blame"); + strvec_push(&rev_argv, rev); init_revisions(&revs, NULL); revs.diffopt.flags.allow_textconv = 1; - setup_revisions(rev_argv.argc, rev_argv.argv, &revs, NULL); + setup_revisions(rev_argv.nr, rev_argv.v, &revs, NULL); init_scoreboard(&sb); sb.revs = &revs; sb.repo = the_repository; -- cgit v1.2.3-24-g4f1b From 779631c6dc23c15bbbf45a7c7ab9fffb619037b7 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 20 Oct 2020 23:32:45 +0200 Subject: 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 --- ui-blame.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui-blame.c') diff --git a/ui-blame.c b/ui-blame.c index c3662bb..cfab7fb 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -48,7 +48,7 @@ static void emit_blame_entry_hash(struct blame_entry *ent) unsigned long line = 0; char *detail = emit_suspect_detail(suspect); - html(""); + html(""); cgit_commit_link(find_unique_abbrev(oid, DEFAULT_ABBREV), detail, NULL, ctx.qry.head, oid_to_hex(oid), suspect->path); html(""); @@ -256,7 +256,7 @@ static int basedir_len(const char *path) void cgit_print_blame(void) { - const char *rev = ctx.qry.sha1; + const char *rev = ctx.qry.oid; struct object_id oid; struct commit *commit; struct pathspec_item path_items = { -- cgit v1.2.3-24-g4f1b From cef27b670a66c9840bb6120260864e4b3a701dc2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 28 Dec 2020 23:27:13 +0100 Subject: git: update to v2.30.0 Update to git version v2.30.0, this requires changes for these upstream commits: * 88894aaeeae92e8cb41143cc2e045f50289dc790 blame: simplify 'setup_scoreboard' interface * 1fbfdf556f2abc708183caca53ae4e2881b46ae2 banned.h: mark non-reentrant gmtime, etc as banned Signed-off-by: Christian Hesse --- ui-blame.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui-blame.c') diff --git a/ui-blame.c b/ui-blame.c index cfab7fb..ec1d888 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -132,7 +132,8 @@ static void print_object(const struct object_id *oid, const char *path, init_scoreboard(&sb); sb.revs = &revs; sb.repo = the_repository; - setup_scoreboard(&sb, path, &o); + sb.path = path; + setup_scoreboard(&sb, &o); o->suspects = blame_entry_prepend(NULL, 0, sb.num_lines, o); prio_queue_put(&sb.commits, o->commit); blame_origin_decref(o); -- cgit v1.2.3-24-g4f1b From 5258c297ba6fb604ae1415fbc19a3fe42457e49e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 18 May 2021 22:49:13 +0200 Subject: git: update to v2.32.0 Update to git version v2.32.0, this requires changes for these upstream commits: * 47957485b3b731a7860e0554d2bd12c0dce1c75a tree.h API: simplify read_tree_recursive() signature Signed-off-by: Christian Hesse --- ui-blame.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'ui-blame.c') diff --git a/ui-blame.c b/ui-blame.c index ec1d888..03136f7 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -221,8 +221,7 @@ cleanup: } static int walk_tree(const struct object_id *oid, struct strbuf *base, - const char *pathname, unsigned mode, int stage, - void *cbdata) + const char *pathname, unsigned mode, void *cbdata) { struct walk_tree_context *walk_tree_ctx = cbdata; @@ -291,10 +290,8 @@ void cgit_print_blame(void) walk_tree_ctx.match_baselen = (path_items.match) ? basedir_len(path_items.match) : -1; - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, commit), - "", 0, 0, - &paths, walk_tree, &walk_tree_ctx); + read_tree(the_repository, repo_get_commit_tree(the_repository, commit), + &paths, walk_tree, &walk_tree_ctx); if (!walk_tree_ctx.state) cgit_print_error_page(404, "Not found", "Not found"); else if (walk_tree_ctx.state == 2) -- cgit v1.2.3-24-g4f1b