summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/config.txt8
-rw-r--r--builtin/fsck.c13
2 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index f6cbd6d..18cc592 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1253,6 +1253,14 @@ that setting `fsck.missingEmail = ignore` will hide that issue.
This feature is intended to support working with legacy repositories
which cannot be repaired without disruptive changes.
+fsck.skipList::
+ The path to a sorted list of object names (i.e. one SHA-1 per
+ line) that are known to be broken in a non-fatal way and should
+ be ignored. This feature is useful when an established project
+ should be accepted despite early commits containing errors that
+ can be safely ignored such as invalid committer email addresses.
+ Note: corrupt objects cannot be skipped with this setting.
+
gc.aggressiveDepth::
The depth parameter used in the delta compression
algorithm used by 'git gc --aggressive'. This defaults
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 070909e..67237a6 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -49,6 +49,19 @@ static int show_dangling = 1;
static int fsck_config(const char *var, const char *value, void *cb)
{
+ if (strcmp(var, "fsck.skiplist") == 0) {
+ const char *path;
+ struct strbuf sb = STRBUF_INIT;
+
+ if (git_config_pathname(&path, var, value))
+ return 1;
+ strbuf_addf(&sb, "skiplist=%s", path);
+ free((char *)path);
+ fsck_set_msg_types(&fsck_obj_options, sb.buf);
+ strbuf_release(&sb);
+ return 0;
+ }
+
if (skip_prefix(var, "fsck.", &var)) {
fsck_set_msg_type(&fsck_obj_options, var, value);
return 0;