During fetch-pack operations, git-index-pack(1) may be spawned and perform fsck checks. The message severity of these checks is configurable and propagated via appending it to the `--fsck-objects` option. With `fetch_pack_config_cb()`, fsck configuration gets populated to a `fetch_pack_options`. Expose `fetch_pack_config_cb()`, to facilitate formatted fsck message configuration generation. In a subsequent commit, this is used to wire message configuration to `unbundle()` during bundle fetches. Signed-off-by: Justin Tobler <jltobler@xxxxxxxxx> --- fetch-pack.c | 4 ++-- fetch-pack.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fetch-pack.c b/fetch-pack.c index 73309f8043..10b66795bc 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -1857,8 +1857,8 @@ static struct ref *do_fetch_pack_v2(struct fetch_pack_args *args, return ref; } -static int fetch_pack_config_cb(const char *var, const char *value, - const struct config_context *ctx, void *cb) +int fetch_pack_config_cb(const char *var, const char *value, + const struct config_context *ctx, void *cb) { struct fetch_pack_options *opts = cb; const char *msg_id; diff --git a/fetch-pack.h b/fetch-pack.h index 8243b754ce..f35a75a3c5 100644 --- a/fetch-pack.h +++ b/fetch-pack.h @@ -1,6 +1,7 @@ #ifndef FETCH_PACK_H #define FETCH_PACK_H +#include "config.h" #include "string-list.h" #include "protocol.h" #include "list-objects-filter-options.h" @@ -114,4 +115,7 @@ struct fetch_pack_options { .fsck_msg_types = STRBUF_INIT, \ } +int fetch_pack_config_cb(const char *var, const char *value, + const struct config_context *ctx, void *cb); + #endif -- 2.47.0