Thread (23 messages) 23 messages, 4 authors, 2019-10-30

Re: [PATCH v2 1/2] t5510-fetch.sh: demonstrate fetch.writeCommitGraph bug

From: SZEDER Gábor <hidden>
Date: 2019-10-24 12:18:28

On Wed, Oct 23, 2019 at 01:01:34PM +0000, Derrick Stolee via GitGitGadget wrote:
quoted hunk ↗ jump to hunk
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.
+	)
+'
+
 # configured prune tests
 
 set_config_tristate () {
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help