summaryrefslogtreecommitdiff
path: root/builtin/fsck.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-05-19 19:48:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-19 23:13:22 (GMT)
commite68a5272b1aab46514ae01745be50948ac375146 (patch)
tree1af3ed9be1c37fe8087102d104d69bb70debfa95 /builtin/fsck.c
parent66ec0390e75406aa9f9295577052b9ec06d3a169 (diff)
downloadgit-e68a5272b1aab46514ae01745be50948ac375146.zip
git-e68a5272b1aab46514ae01745be50948ac375146.tar.gz
git-e68a5272b1aab46514ae01745be50948ac375146.tar.bz2
fsck: use ERROR_MULTI_PACK_INDEX
The multi-pack-index was added to the data verified by git-fsck in ea5ae6c3 "fsck: verify multi-pack-index". This implementation was based on the implementation for verifying the commit-graph, and a copy-paste error kept the ERROR_COMMIT_GRAPH flag as the bit set when an error appears in the multi-pack-index. Add a new flag, ERROR_MULTI_PACK_INDEX, and use that instead. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fsck.c')
-rw-r--r--builtin/fsck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 06eb421..b1447c2 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -49,6 +49,7 @@ static int name_objects;
#define ERROR_PACK 04
#define ERROR_REFS 010
#define ERROR_COMMIT_GRAPH 020
+#define ERROR_MULTI_PACK_INDEX 040
static const char *describe_object(struct object *obj)
{
@@ -862,7 +863,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
midx_argv[2] = "--object-dir";
midx_argv[3] = alt->path;
if (run_command(&midx_verify))
- errors_found |= ERROR_COMMIT_GRAPH;
+ errors_found |= ERROR_MULTI_PACK_INDEX;
}
}