git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] t1501: fix test with split index

From
Thomas Gummerer <t.gummerer@gmail.com>
Date
Mar 24, 2015, 19:21 UTC
Message-ID
<1427224900-2206-1-git-send-email-t.gummerer@gmail.com>
In-Reply-To
<xmqqa8z26zwi.fsf@gitster.dls.corp.google.com>

t1501-worktree.sh does not copy the shared index in the "relative $GIT_WORK_TREE and git subprocesses" test, which makes the test fail when GIT_TEST_SPLIT_INDEX is set. Copy the shared index as well in order to fix this.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
Show 5 quoted lines
> Is this a good place to use "test-might-fail", e.g.
>
>        test_might_fail cp repo.git/sharedindex.* repo.git/repos/foo &&
>
> or something?
Yeah that makes sense, thanks.
 t/t1501-worktree.sh | 1 +
 1 file changed, 1 insertion(+)
diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index 4df7a2f..cc5b870 100755
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
@@ -350,6 +350,7 @@ test_expect_success 'Multi-worktree setup' '
 	mkdir work &&
 	mkdir -p repo.git/repos/foo &&
 	cp repo.git/HEAD repo.git/index repo.git/repos/foo &&
+	test_might_fail cp repo.git/sharedindex.* repo.git/repos/foo &&
 	sane_unset GIT_DIR GIT_CONFIG GIT_WORK_TREE
 '
 
-- 
2.1.0.264.g0463184.dirty
Previous: Junio C Hamano
Message 3 of 3 in “t1501: fix test with split index”
  1. t1501: fix test with split indexThomas Gummerer, Mar 24, 2015
  2. Junio C HamanoMar 24, 2015
  3. t1501: fix test with split indexThomas Gummerer, Mar 24, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.