diff options
author | Vincent Ambo <mail@tazj.in> | 2020-11-21T18·59+0100 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2020-11-21T19·09+0100 |
commit | 1e81ce6622ef790b297ff48f1d0286f51e225aee (patch) | |
tree | 152c022824a5cd4970bb41daa1fe94937b87a0e9 /third_party/cgit/cgit.c | |
parent | f4609b896fac842433bd495c166d5987852a6a73 (diff) |
merge(3p/cgit): subtree merge at adcc4f82 r/1891
Change-Id: I16941629a17a2f39b9324cb85dc0cec6b104dfe4
Diffstat (limited to 'third_party/cgit/cgit.c')
-rw-r--r-- | third_party/cgit/cgit.c | 18 |
1 files changed, 9 insertions, 9 deletions
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) |