Skip to content

Commit 683e476

Browse files
jltoblergitster
authored andcommitted
fetch-pack: expose fetch_pack_config_cb()
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f75d6ce commit 683e476

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

fetch-pack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,8 +1857,8 @@ static struct ref *do_fetch_pack_v2(struct fetch_pack_args *args,
18571857
return ref;
18581858
}
18591859

1860-
static int fetch_pack_config_cb(const char *var, const char *value,
1861-
const struct config_context *ctx, void *cb)
1860+
int fetch_pack_config_cb(const char *var, const char *value,
1861+
const struct config_context *ctx, void *cb)
18621862
{
18631863
struct fetch_pack_options *opts = cb;
18641864
const char *msg_id;

fetch-pack.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef FETCH_PACK_H
22
#define FETCH_PACK_H
33

4+
#include "config.h"
45
#include "string-list.h"
56
#include "protocol.h"
67
#include "list-objects-filter-options.h"
@@ -114,4 +115,7 @@ struct fetch_pack_options {
114115
.fsck_msg_types = STRBUF_INIT, \
115116
}
116117

118+
int fetch_pack_config_cb(const char *var, const char *value,
119+
const struct config_context *ctx, void *cb);
120+
117121
#endif

0 commit comments

Comments
 (0)