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 <szeder.dev@gmail.com> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Christian Couder committed May 26, 2018 at 08:47 UTC 5340d4710700f0de378a49ac178a8c1873c316ad
2 files changed +2 -2
t/t9902-completion.sh
+1 -1
@@ -179,7 +179,7 @@ test_expect_success '__git_find_repo_path - cwd is a .git directory' '
179 test_expect_success '__git_find_repo_path - parent is a .git directory' '
180 echo "$ROOT/.git" >expected &&
181 (
182 - cd .git/refs/heads &&
182 + cd .git/objects &&
183 __git_find_repo_path &&
184 echo "$__git_repo_path" >"$actual"
185 ) &&
t/t9903-bash-prompt.sh
+1 -1
@@ -148,7 +148,7 @@ test_expect_success 'prompt - inside .git directory' '
148 test_expect_success 'prompt - deep inside .git directory' '
149 printf " (GIT_DIR!)" >expected &&
150 (
151 - cd .git/refs/heads &&
151 + cd .git/objects &&
152 __git_ps1 >"$actual"
153 ) &&
154 test_cmp expected "$actual"