path: root/builtin/unpack-objects.c
diff options
authorJohannes Schindelin <>2015-06-22 15:25:31 (GMT)
committerJunio C Hamano <>2015-06-23 21:27:34 (GMT)
commit5d477a334a68698709f07ebda4999c10997ef6f7 (patch)
treef4c7fcfb0a01837356312278f1921e5c0db3fc82 /builtin/unpack-objects.c
parent0282f4dced029230024196e460b9d9f971f494dd (diff)
fsck (receive-pack): allow demoting errors to warnings
For example, missing emails in commit and tag objects can be demoted to mere warnings with git config receive.fsck.missingemail=warn The value is actually a comma-separated list. In case that the same key is listed in multiple receive.fsck.<msg-id> lines in the config, the latter configuration wins (this can happen for example when both $HOME/.gitconfig and .git/config contain message type settings). As git receive-pack does not actually perform the checks, it hands off the setting to index-pack or unpack-objects in the form of an optional argument to the --strict option. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/unpack-objects.c')
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index 6d17040..7cc086f 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -530,6 +530,11 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix)
strict = 1;
+ if (skip_prefix(arg, "--strict=", &arg)) {
+ strict = 1;
+ fsck_set_msg_types(&fsck_options, arg);
+ continue;
+ }
if (starts_with(arg, "--pack_header=")) {
struct pack_header *hdr;
char *c;