diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-16 10:10:13 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-16 10:10:14 -0700 |
| commit | bca900904d854babf2493d57c0fee3ab421fe750 (patch) | |
| tree | e664fba784c58d391ddf22c32222b0212b670171 /http-backend.c | |
| parent | f0e2183768b1548bcaea9e311bb5a54112c0a9f4 (diff) | |
| parent | c8f815c2083c4b340d4148a15d45c55f2fcc7d3f (diff) | |
Merge branch 'ps/refs-without-the-repository'
The refs API lost functions that implicitly assumes to work on the
primary ref_store by forcing the callers to pass a ref_store as an
argument.
* ps/refs-without-the-repository:
refs: remove functions without ref store
cocci: apply rules to rewrite callers of "refs" interfaces
cocci: introduce rules to transform "refs" to pass ref store
refs: add `exclude_patterns` parameter to `for_each_fullref_in()`
refs: introduce missing functions that accept a `struct ref_store`
Diffstat (limited to 'http-backend.c')
| -rw-r--r-- | http-backend.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/http-backend.c b/http-backend.c index 1ed1e29d07..5b65287ac9 100644 --- a/http-backend.c +++ b/http-backend.c @@ -559,7 +559,8 @@ static void get_info_refs(struct strbuf *hdr, char *arg UNUSED) } else { select_getanyfile(hdr); - for_each_namespaced_ref(NULL, show_text_ref, &buf); + refs_for_each_namespaced_ref(get_main_ref_store(the_repository), + NULL, show_text_ref, &buf); send_strbuf(hdr, "text/plain", &buf); } strbuf_release(&buf); @@ -571,9 +572,10 @@ static int show_head_ref(const char *refname, const struct object_id *oid, struct strbuf *buf = cb_data; if (flag & REF_ISSYMREF) { - const char *target = resolve_ref_unsafe(refname, - RESOLVE_REF_READING, - NULL, NULL); + const char *target = refs_resolve_ref_unsafe(get_main_ref_store(the_repository), + refname, + RESOLVE_REF_READING, + NULL, NULL); if (target) strbuf_addf(buf, "ref: %s\n", strip_namespace(target)); @@ -589,7 +591,8 @@ static void get_head(struct strbuf *hdr, char *arg UNUSED) struct strbuf buf = STRBUF_INIT; select_getanyfile(hdr); - head_ref_namespaced(show_head_ref, &buf); + refs_head_ref_namespaced(get_main_ref_store(the_repository), + show_head_ref, &buf); send_strbuf(hdr, "text/plain", &buf); strbuf_release(&buf); } |
