Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fsck.c5
-rw-r--r--fsck.h1
-rwxr-xr-xt/t5504-fetch-receive-strict.sh9
3 files changed, 14 insertions, 1 deletions
diff --git a/fsck.c b/fsck.c
index a4205aaa5f..680f35eff0 100644
--- a/fsck.c
+++ b/fsck.c
@@ -131,6 +131,8 @@ static int parse_msg_type(const char *str)
return FSCK_ERROR;
else if (!strcmp(str, "warn"))
return FSCK_WARN;
+ else if (!strcmp(str, "ignore"))
+ return FSCK_IGNORE;
else
die("Unknown fsck message type: '%s'", str);
}
@@ -222,6 +224,9 @@ static int report(struct fsck_options *options, struct object *object,
struct strbuf sb = STRBUF_INIT;
int msg_type = fsck_msg_type(id, options), result;
+ if (msg_type == FSCK_IGNORE)
+ return 0;
+
if (msg_type == FSCK_FATAL)
msg_type = FSCK_ERROR;
diff --git a/fsck.h b/fsck.h
index 3ef92a31a6..1dab276899 100644
--- a/fsck.h
+++ b/fsck.h
@@ -3,6 +3,7 @@
#define FSCK_ERROR 1
#define FSCK_WARN 2
+#define FSCK_IGNORE 3
struct fsck_options;
diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh
index f5d6d0ded0..720c121522 100755
--- a/t/t5504-fetch-receive-strict.sh
+++ b/t/t5504-fetch-receive-strict.sh
@@ -133,7 +133,14 @@ test_expect_success 'push with receive.fsck.missingEmail=warn' '
git --git-dir=dst/.git config \
receive.fsck.missingEmail warn &&
git push --porcelain dst bogus >act 2>&1 &&
- grep "missingEmail" act
+ grep "missingEmail" act &&
+ git --git-dir=dst/.git branch -D bogus &&
+ git --git-dir=dst/.git config --add \
+ receive.fsck.missingEmail ignore &&
+ git --git-dir=dst/.git config --add \
+ receive.fsck.badDate warn &&
+ git push --porcelain dst bogus >act 2>&1 &&
+ test_must_fail grep "missingEmail" act
'
test_expect_success \