Re: [PATCH 1/3] fsck: verify commit graph when implicitly enabled
From: Taylor Blau <hidden>
Date: 2021-09-13 19:36:19
On Mon, Sep 13, 2021 at 03:33:40PM -0400, Eric Sunshine wrote:
On Mon, Sep 13, 2021 at 3:29 PM Taylor Blau [off-list ref] wrote:quoted
On Mon, Sep 13, 2021 at 11:12:19AM -0700, Glen Choo wrote:quoted
+test_expect_success 'git fsck (ignores commit-graph when config set to false)' ' + cd "$TRASH_DIRECTORY/full" && + git fsck && + corrupt_graph_and_verify $GRAPH_BYTE_FOOTER "\00" \ + "incorrect checksum" && + cp commit-graph-pre-write-test $objdir/info/commit-graph && + git -c core.commitGraph=false fsckNit; I recommend replacing the `-c` style configuration with `test_config`, which modifies `$GIT_DIR/config` but only for the duration of the sub-shell.Small correction: There is no subshell here, so it would be more accurate to say "... for the duration of the test".
Yes, sorry about that: I did not mean to say "subshell" here (Glen: hopefully you didn't read too far into that, since test_config() does not work in subshells). Thanks for catching that, Eric. Thanks, Taylor