Files
git/upload-pack.h
Christian Couder 33afb07a34 upload-pack: read uploadpack.lazyFetchTrusted
Previous commits created and prepared the path_allowlist_apply()
function.

Let's reuse this function for a new "uploadpack.lazyFetchTrusted"
configuration variable.

It allows us to:

  - read an allowlist from that config variable,
  - check if the current repo is in that list, and
  - return the result from a new upload_pack_lazy_fetch_trusted()
    function.

The new function will be used in a following commit.

Note that the new config variable should be read only from protected
configuration files.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-07 09:48:40 -07:00

19 lines
477 B
C

#ifndef UPLOAD_PACK_H
#define UPLOAD_PACK_H
void upload_pack(const int advertise_refs, const int stateless_rpc,
const int timeout);
struct repository;
struct packet_reader;
int upload_pack_v2(struct repository *r, struct packet_reader *request);
struct strbuf;
int upload_pack_advertise(struct repository *r,
struct strbuf *value);
/* Is this repo trusted for lazy fetching? */
bool upload_pack_lazy_fetch_trusted(struct repository *r);
#endif /* UPLOAD_PACK_H */