Merge branch 'ab/fsck-transfer-updates'
authorJunio C Hamano <gitster@pobox.com>
Fri, 17 Aug 2018 20:09:54 +0000 (13:09 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Aug 2018 20:09:54 +0000 (13:09 -0700)
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.<msg-id> 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.<msg-id> tests: remove dead code

1  2 
Documentation/config.txt
fetch-pack.c
Simple merge
diff --cc fetch-pack.c
index f80a7acdf3b3edd7425a56434c9fae6adcc4f9bd,aea2f6cf263b56ec392745764cddf24ddcd88a69..88a078e9befd281cf5f03e9e64615b14ca768a35
@@@ -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)