mirror of
https://github.com/git/git.git
synced 2026-08-08 17:11:48 +00:00
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>
19 lines
477 B
C
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 */
|