Re: [PATCH v2 1/2] t5510-fetch.sh: demonstrate fetch.writeCommitGraph bug
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Oct 24, 2019, 12:18 UTC
- Message-ID
- <20191024121822.GL4348@szeder.dev>
- In-Reply-To
- <6ac0a05746df8ac3b1dd788f525b2620bc4d9a08.1571835695.git.gitgitgadget@gmail.com>
On Wed, Oct 23, 2019 at 01:01:34PM +0000, Derrick Stolee via GitGitGadget wrote:
Show 22 quoted lines
> diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh > index ecabbe1616..e8ae3af0b6 100755 > --- a/t/t5510-fetch.sh > +++ b/t/t5510-fetch.sh > @@ -583,6 +583,23 @@ test_expect_success 'fetch.writeCommitGraph' ' > ) > ' > > +test_expect_failure 'fetch.writeCommitGraph with submodules' ' > + pwd="$(pwd)" && > + git clone dups super && > + ( > + cd super && > + git submodule add "file://$pwd/three" && > + git commit -m "add submodule" > + ) && > + git clone "super" writeError && > + ( > + cd writeError && > + test_path_is_missing .git/objects/info/commit-graphs/commit-graph-chain && > + git -c fetch.writeCommitGraph=true fetch origin && > + test_path_is_file .git/objects/info/commit-graphs/commit-graph-chain
With the fix applied this test fails when run with GIT_TEST_COMMIT_GRAPH=1:
+ cd writeError + test_path_is_missing .git/objects/info/commit-graphs/commit-graph-chain + test -e .git/objects/info/commit-graphs/commit-graph-chain + git -c fetch.writeCommitGraph=true fetch origin + test_path_is_file .git/objects/info/commit-graphs/commit-graph-chain + test -f .git/objects/info/commit-graphs/commit-graph-chain + echo File .git/objects/info/commit-graphs/commit-graph-chain doesn't exist. File .git/objects/info/commit-graphs/commit-graph-chain doesn't exist. + false error: last command exited with $?=1
I think GIT_TEST_COMMIT_GRAPH should be unset for both fetch.writeCommitGraph tests.
Show 9 quoted lines
> + )
> +'
> +
> # configured prune tests
>
> set_config_tristate () {
> --
> gitgitgadget
>