Thread (59 messages) flat view 59 messages, 7 authors, 2021-10-15

Re: [PATCH 1/3] fsck: verify commit graph when implicitly enabled

From: Eric Sunshine <hidden>
Date: 2021-09-13 19:33:54

On Mon, Sep 13, 2021 at 3:29 PM Taylor Blau [off-list ref] wrote:
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 fsck
Nit; 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".

Aside: In fact, test_config() can't be used in subshells due to
implementation limitations which I won't go into.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help