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

[PATCH 06/14] git p4: verify expected refs in clone --bare test

From
PWPete Wyckoff <pw@padd.com>
Date
Jan 15, 2013, 00:47 UTC
Message-ID
<1358210828-2369-7-git-send-email-pw@padd.com>
In-Reply-To
<1358210828-2369-1-git-send-email-pw@padd.com>
Make sure that the standard branches are created as expected.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
 t/t9800-git-p4-basic.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh
index 8c59796..166e752 100755
--- a/t/t9800-git-p4-basic.sh
+++ b/t/t9800-git-p4-basic.sh
@@ -160,9 +160,12 @@ test_expect_success 'clone --bare should make a bare repository' '
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
-		test ! -d .git &&
-		bare=`git config --get core.bare` &&
-		test "$bare" = true
+		test_path_is_missing .git &&
+		git config --get --bool core.bare true &&
+		git rev-parse --verify refs/remotes/p4/master &&
+		git rev-parse --verify refs/remotes/p4/HEAD &&
+		git rev-parse --verify refs/heads/master &&
+		git rev-parse --verify HEAD
 	)
 '
 
-- 
1.8.1.350.gdbf6fd0
Previous: Pete WyckoffNext: Pete Wyckoff
Message 7 of 15 in “git p4 branch handling fixes”
  1. 00/14 git p4 branch handling fixesPete Wyckoff, Jan 15, 2013
  2. 01/14 git p4: test sync/clone --branch behaviorPete Wyckoff, Jan 15, 2013
  3. 02/14 git p4: rearrange and simplify hasOrigin handlingPete Wyckoff, Jan 15, 2013
  4. 03/14 git p4: add comments to p4BranchesInGitPete Wyckoff, Jan 15, 2013
  5. 04/14 git p4: inline listExistingP4GitBranchesPete Wyckoff, Jan 15, 2013
  6. 05/14 git p4: create p4/HEAD on initial clonePete Wyckoff, Jan 15, 2013
  7. 06/14 git p4: verify expected refs in clone --bare testPete Wyckoff, Jan 15, 2013
  8. 07/14 git p4: clone --branch should checkout masterPete Wyckoff, Jan 15, 2013
  9. 08/14 git p4 doc: fix branch detection examplePete Wyckoff, Jan 15, 2013
  10. 09/14 git p4: allow short ref names to --branchPete Wyckoff, Jan 15, 2013
  11. 10/14 git p4: rearrange self.initialParent usePete Wyckoff, Jan 15, 2013
  12. 11/14 git p4: fail gracefully on sync with no master branchPete Wyckoff, Jan 15, 2013
  13. 12/14 git p4: fix sync --branch when no master branchPete Wyckoff, Jan 15, 2013
  14. 13/14 git p4 test: keep P4CLIENT changes inside subshellsPete Wyckoff, Jan 15, 2013
  15. 14/14 git p4: fix submit when no master branchPete Wyckoff, Jan 15, 2013

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.