[PATCH 6/6] t1500: be considerate to future potential tests
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 10, 2016, 05:20 UTC
- Message-ID
- <20160510052055.32924-7-sunshine@sunshineco.com>
- In-Reply-To
- <20160510052055.32924-1-sunshine@sunshineco.com>
The final batch of git-rev-parse tests work against a non-local object database named ../repo.git rather than the typically-named ../.git. It prepares by renaming .git/ to repo.git/ and pointing GIT_DIR at ../repo.git, but never restores the name to .git/, which can be problematic for tests added in the future. Be more friendly by instead making repo.git/ a copy of .git/.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> --- t/t1500-rev-parse.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh index 525e6d3..af223ed 100755 --- a/t/t1500-rev-parse.sh +++ b/t/t1500-rev-parse.sh @@ -72,7 +72,7 @@ test_rev_parse -C work -g ../.git -b t 'GIT_DIR=../.git, core.bare = true' true test_rev_parse -C work -g ../.git -b u 'GIT_DIR=../.git, core.bare undefined' false false true '' -test_expect_success 'setup non-local database ../repo.git' 'mv .git repo.git' +test_expect_success 'setup non-local database ../repo.git' 'cp -R .git repo.git' test_rev_parse -C work -g ../repo.git -b f 'GIT_DIR=../repo.git, core.bare = false' false false true ''
-- 2.8.2.530.g51d527d