Skip to content

Commit 5340d47

Browse files
chriscoolgitster
authored andcommitted
t990X: use '.git/objects' as 'deep inside .git' path
Tests t9902-completion.sh and t9903-bash-prompt.sh each have tests that check what happens when we are "in the '.git' directory" and when we are "deep inside the '.git' directory". To test the case when we are "deep inside the '.git' directory" the test scripts used to perform a `cd .git/refs/heads`. As there are plans to implement other ref storage systems, let's use '.git/objects' instead of '.git/refs/heads' as the "deep inside the '.git' directory" path. This makes it clear to readers that these tests do not depend on which ref backend is used. The internals of the loose refs backend are still tested in t1400-update-ref.sh. Helped-by: SZEDER Gábor <[email protected]> Signed-off-by: David Turner <[email protected]> Signed-off-by: Christian Couder <[email protected]> Reviewed-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cbc5cf7 commit 5340d47

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/t9902-completion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ test_expect_success '__git_find_repo_path - cwd is a .git directory' '
179179
test_expect_success '__git_find_repo_path - parent is a .git directory' '
180180
echo "$ROOT/.git" >expected &&
181181
(
182-
cd .git/refs/heads &&
182+
cd .git/objects &&
183183
__git_find_repo_path &&
184184
echo "$__git_repo_path" >"$actual"
185185
) &&

t/t9903-bash-prompt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ test_expect_success 'prompt - inside .git directory' '
148148
test_expect_success 'prompt - deep inside .git directory' '
149149
printf " (GIT_DIR!)" >expected &&
150150
(
151-
cd .git/refs/heads &&
151+
cd .git/objects &&
152152
__git_ps1 >"$actual"
153153
) &&
154154
test_cmp expected "$actual"

0 commit comments

Comments
 (0)