fetch.fsckobjects: verify downloaded objects
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>
This commit is contained in:
parent
81b50f3ce4
commit
5e838ea7aa
@ -820,6 +820,12 @@ diff.wordRegex::
|
|||||||
sequences that match the regular expression are "words", all other
|
sequences that match the regular expression are "words", all other
|
||||||
characters are *ignorable* whitespace.
|
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::
|
fetch.unpackLimit::
|
||||||
If the number of objects fetched over the git native
|
If the number of objects fetched over the git native
|
||||||
transfer is below this
|
transfer is below this
|
||||||
|
@ -14,6 +14,7 @@ static int transfer_unpack_limit = -1;
|
|||||||
static int fetch_unpack_limit = -1;
|
static int fetch_unpack_limit = -1;
|
||||||
static int unpack_limit = 100;
|
static int unpack_limit = 100;
|
||||||
static int prefer_ofs_delta = 1;
|
static int prefer_ofs_delta = 1;
|
||||||
|
static int fetch_fsck_objects;
|
||||||
static struct fetch_pack_args args = {
|
static struct fetch_pack_args args = {
|
||||||
/* .uploadpack = */ "git-upload-pack",
|
/* .uploadpack = */ "git-upload-pack",
|
||||||
};
|
};
|
||||||
@ -663,6 +664,8 @@ static int get_pack(int xd[2], char **pack_lockfile)
|
|||||||
}
|
}
|
||||||
if (*hdr_arg)
|
if (*hdr_arg)
|
||||||
*av++ = hdr_arg;
|
*av++ = hdr_arg;
|
||||||
|
if (fetch_fsck_objects)
|
||||||
|
*av++ = "--strict";
|
||||||
*av++ = NULL;
|
*av++ = NULL;
|
||||||
|
|
||||||
cmd.in = demux.out;
|
cmd.in = demux.out;
|
||||||
@ -776,6 +779,11 @@ static int fetch_pack_config(const char *var, const char *value, void *cb)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcmp(var, "fetch.fsckobjects")) {
|
||||||
|
fetch_fsck_objects = git_config_bool(var, value);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return git_default_config(var, value, cb);
|
return git_default_config(var, value, cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user