From: Junio C Hamano Date: Fri, 17 Aug 2018 20:09:54 +0000 (-0700) Subject: Merge branch 'ab/fsck-transfer-updates' X-Git-Tag: v2.19.0-rc0~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8ca71870a4265320fbbecb4f676d0ad1d4bf176;p=thirdparty%2Fgit.git Merge branch 'ab/fsck-transfer-updates' The test performed at the receiving end of "git push" to prevent bad objects from entering repository can be customized via receive.fsck.* configuration variables; we now have gained a counterpart to do the same on the "git fetch" side, with fetch.fsck.* configuration variables. * ab/fsck-transfer-updates: fsck: test and document unknown fsck. values fsck: add stress tests for fsck.skipList fsck: test & document {fetch,receive}.fsck.* config fallback fetch: implement fetch.fsck.* transfer.fsckObjects tests: untangle confusing setup config doc: elaborate on fetch.fsckObjects security config doc: elaborate on what transfer.fsckObjects does config doc: unify the description of fsck.* and receive.fsck.* config doc: don't describe *.fetchObjects twice receive.fsck. tests: remove dead code --- f8ca71870a4265320fbbecb4f676d0ad1d4bf176 diff --cc fetch-pack.c index f80a7acdf3,aea2f6cf26..88a078e9be --- a/fetch-pack.c +++ b/fetch-pack.c @@@ -20,7 -21,7 +20,8 @@@ #include "packfile.h" #include "object-store.h" #include "connected.h" +#include "fetch-negotiator.h" + #include "fsck.h" static int transfer_unpack_limit = -1; static int fetch_unpack_limit = -1; @@@ -35,7 -36,7 +36,8 @@@ static int agent_supported static int server_supports_filtering; static struct lock_file shallow_lock; static const char *alternate_shallow_file; +static char *negotiation_algorithm; + static struct strbuf fsck_msg_types = STRBUF_INIT; /* Remember to update object flag allocation in object.h */ #define COMPLETE (1U << 0) @@@ -1408,10 -1493,8 +1436,10 @@@ static void fetch_pack_config(void git_config_get_bool("repack.usedeltabaseoffset", &prefer_ofs_delta); git_config_get_bool("fetch.fsckobjects", &fetch_fsck_objects); git_config_get_bool("transfer.fsckobjects", &transfer_fsck_objects); + git_config_get_string("fetch.negotiationalgorithm", + &negotiation_algorithm); - git_config(git_default_config, NULL); + git_config(fetch_pack_config_cb, NULL); } static void fetch_pack_setup(void)