summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81b50f3)
raw | patch | inline | side by side (parent: 81b50f3)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 4 Sep 2011 19:26:14 +0000 (12:26 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 4 Sep 2011 19:27:17 +0000 (12:27 -0700) |
This corresponds to receive.fsckobjects configuration variable added (a
lot) earlier in 20dc001 (receive-pack: allow using --strict mode for
unpacking objects, 2008-02-25).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
lot) earlier in 20dc001 (receive-pack: allow using --strict mode for
unpacking objects, 2008-02-25).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | patch | blob | history | |
builtin/fetch-pack.c | patch | blob | history |
index 664de6b1ab1fa187ff510eda414c46b5213a8397..4cbc4b928e4369187f4616f07220061caefd8500 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
sequences that match the regular expression are "words", all other
characters are *ignorable* whitespace.
+fetch.fsckObjects::
+ If it is set to true, git-fetch-pack will check all fetched
+ objects. It will abort in the case of a malformed object or a
+ broken link. The result of an abort are only dangling objects.
+ Defaults to false.
+
fetch.unpackLimit::
If the number of objects fetched over the git native
transfer is below this
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index dbd8b7bcc8b5ddea9bec3a0c774346007cb0d31c..df6a8dc2775cb3ec0d2375b3be34217f9342eb48 100644 (file)
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
static int fetch_unpack_limit = -1;
static int unpack_limit = 100;
static int prefer_ofs_delta = 1;
+static int fetch_fsck_objects;
static struct fetch_pack_args args = {
/* .uploadpack = */ "git-upload-pack",
};
}
if (*hdr_arg)
*av++ = hdr_arg;
+ if (fetch_fsck_objects)
+ *av++ = "--strict";
*av++ = NULL;
cmd.in = demux.out;
return 0;
}
+ if (!strcmp(var, "fetch.fsckobjects")) {
+ fetch_fsck_objects = git_config_bool(var, value);
+ return 0;
+ }
+
return git_default_config(var, value, cb);
}