From 1e81ce6622ef790b297ff48f1d0286f51e225aee Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 21 Nov 2020 19:59:36 +0100 Subject: merge(3p/cgit): subtree merge at adcc4f82 Change-Id: I16941629a17a2f39b9324cb85dc0cec6b104dfe4 --- third_party/cgit/cgit.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'third_party/cgit/cgit.c') diff --git a/third_party/cgit/cgit.c b/third_party/cgit/cgit.c index ac8c6418ba46..08d81a1d4b63 100644 --- a/third_party/cgit/cgit.c +++ b/third_party/cgit/cgit.c @@ -324,11 +324,11 @@ static void querystring_cb(const char *name, const char *value) ctx.qry.head = xstrdup(value); ctx.qry.has_symref = 1; } else if (!strcmp(name, "id")) { - ctx.qry.sha1 = xstrdup(value); - ctx.qry.has_sha1 = 1; + ctx.qry.oid = xstrdup(value); + ctx.qry.has_oid = 1; } else if (!strcmp(name, "id2")) { - ctx.qry.sha2 = xstrdup(value); - ctx.qry.has_sha1 = 1; + ctx.qry.oid2 = xstrdup(value); + ctx.qry.has_oid = 1; } else if (!strcmp(name, "ofs")) { ctx.qry.ofs = atoi(value); } else if (!strcmp(name, "path")) { @@ -579,7 +579,7 @@ static void prepare_repo_env(int *nongit) * load local configuration from the git repository, so we do them both while * the HOME variables are unset. */ setup_git_directory_gently(nongit); - init_display_notes(NULL); + load_display_notes(NULL); } static int prepare_repo_cmd(int nongit) @@ -992,9 +992,9 @@ static void cgit_parse_args(int argc, const char **argv) } else if (skip_prefix(argv[i], "--head=", &arg)) { ctx.qry.head = xstrdup(arg); ctx.qry.has_symref = 1; - } else if (skip_prefix(argv[i], "--sha1=", &arg)) { - ctx.qry.sha1 = xstrdup(arg); - ctx.qry.has_sha1 = 1; + } else if (skip_prefix(argv[i], "--oid=", &arg)) { + ctx.qry.oid = xstrdup(arg); + ctx.qry.has_oid = 1; } else if (skip_prefix(argv[i], "--ofs=", &arg)) { ctx.qry.ofs = atoi(arg); } else if (skip_prefix(argv[i], "--scan-tree=", &arg) || @@ -1037,7 +1037,7 @@ static int calc_ttl(void) if (!strcmp(ctx.qry.page, "snapshot")) return ctx.cfg.cache_snapshot_ttl; - if (ctx.qry.has_sha1) + if (ctx.qry.has_oid) return ctx.cfg.cache_static_ttl; if (ctx.qry.has_symref) -- cgit 1.4.1