]> git.99rst.org Git - git.git/commit
fsck: verify commit graph when implicitly enabled
authorGlen Choo <redacted>
Fri, 15 Oct 2021 20:16:29 +0000 (13:16 -0700)
committerJunio C Hamano <redacted>
Fri, 15 Oct 2021 21:30:07 +0000 (14:30 -0700)
commitf30e4d854bb8462d1a4da697ad95501d33fe4425
tree1ae521bc15646602e65c7ec7353a6b2f66c54596
parented41385ad65ebf5d6341db96728be357dde3194d
fsck: verify commit graph when implicitly enabled

Change fsck to check the "core_commit_graph" variable set in
"repo-settings.c" instead of reading the "core.commitGraph" variable.
This fixes a bug where we wouldn't verify the commit-graph if the
config key was missing. This bug was introduced in
31b1de6a09 (commit-graph: turn on commit-graph by default, 2019-08-13),
where core.commitGraph was turned on by default.

Add tests to "t5318-commit-graph.sh" to verify that fsck checks the
commit-graph as expected for the 3 values of core.commitGraph. Also,
disable GIT_TEST_COMMIT_GRAPH in t/t0410-partial-clone.sh because some
test cases use fsck in ways that assume that commit-graph checking is
disabled.

Helped-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Glen Choo <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/fsck.c
t/t0410-partial-clone.sh
t/t5318-commit-graph.sh
git clone https://git.99rst.org/PROJECT