Thread (51 messages) flat view 51 messages, 6 authors, 2016-06-15

Re: [PATCH v6 32/32] tests: add ref-storage argument

From: SZEDER Gábor <hidden>
Date: 2016-06-15 23:08:33
Subsystem: the rest · Maintainer: Linus Torvalds

Hi,
quoted hunk ↗ jump to hunk
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 2ba62fb..d5751e2 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -126,7 +126,7 @@ actual="$TRASH_DIRECTORY/actual"
 
 test_expect_success 'setup for __gitdir tests' '
 	mkdir -p subdir/subsubdir &&
-	git init otherrepo
+	git init $ref_storage_arg otherrepo
 '
 
 test_expect_success '__gitdir - from command line (through $__git_dir)' '
@@ -177,6 +177,7 @@ test_expect_success '__gitdir - cwd is a .git directory' '
 test_expect_success '__gitdir - parent is a .git directory' '
 	echo "$(pwd -P)/.git" >expected &&
 	(
+		mkdir -p .git/refs/heads &&
 		cd .git/refs/heads &&
 		__gitdir >"$actual"
 	) &&
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index ffbfa0e..caa706c 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -148,6 +148,7 @@ test_expect_success 'prompt - inside .git directory' '
 test_expect_success 'prompt - deep inside .git directory' '
 	printf " (GIT_DIR!)" >expected &&
 	(
+		mkdir -p .git/refs/heads &&
 		cd .git/refs/heads &&
 		__git_ps1 >"$actual"
 	) &&
As far as these tests are concerned any subdirectory under .git/ would
do, it doesn't have to be .git/refs/heads.  How about cd-ing into a
different directory instead of creating the missing ones?

 ----  >8  ----
Subject: [PATCH] fixup! tests: add ref-storage argument

---
 t/t9902-completion.sh  | 3 +--
 t/t9903-bash-prompt.sh | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index d5751e25eb50..605816a9b996 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -177,8 +177,7 @@ test_expect_success '__gitdir - cwd is a .git directory' '
 test_expect_success '__gitdir - parent is a .git directory' '
 	echo "$(pwd -P)/.git" >expected &&
 	(
-		mkdir -p .git/refs/heads &&
-		cd .git/refs/heads &&
+		cd .git/objects &&
 		__gitdir >"$actual"
 	) &&
 	test_cmp expected "$actual"
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index 683b4705167f..6068ccb92eb9 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -148,8 +148,7 @@ test_expect_success 'prompt - inside .git directory' '
 test_expect_success 'prompt - deep inside .git directory' '
 	printf " (GIT_DIR!)" >expected &&
 	(
-		mkdir -p .git/refs/heads &&
-		cd .git/refs/heads &&
+		cd .git/objects &&
 		__git_ps1 >"$actual"
 	) &&
 	test_cmp expected "$actual"
-- 
2.7.2.410.g92cb358
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help