diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-10 01:25:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-10 01:25:44 +0300 |
commit | bf8126fff9cdab2583f1c8b274c0d29ebd000c26 (patch) | |
tree | a54d56765bf569cfaefd441630fd10d3b2b3ea29 /t/t0001-init.sh | |
parent | 3e6c6b7787b66116f1533043c2e2cf840c6d0f3e (diff) | |
parent | ed33bd8f305fd62c87059aa227b99d2411e8eabc (diff) |
Merge branch 'js/t0001-case-insensitive'
Test update.
* js/t0001-case-insensitive:
t0001: fix on case-insensitive filesystems
Diffstat (limited to 't/t0001-init.sh')
-rwxr-xr-x | t/t0001-init.sh | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 0276d14a0b..77c5ed6a18 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -311,8 +311,8 @@ test_expect_success 'init prefers command line to GIT_DIR' ' test_expect_success 'init with separate gitdir' ' rm -rf newdir && git init --separate-git-dir realgitdir newdir && - echo "gitdir: $(pwd)/realgitdir" >expected && - test_cmp expected newdir/.git && + newdir_git="$(cat newdir/.git)" && + test_cmp_fspath "$(pwd)/realgitdir" "${newdir_git#gitdir: }" && test_path_is_dir realgitdir/refs ' @@ -361,12 +361,9 @@ test_expect_success 're-init on .git file' ' ' test_expect_success 're-init to update git link' ' - ( - cd newdir && - git init --separate-git-dir ../surrealgitdir - ) && - echo "gitdir: $(pwd)/surrealgitdir" >expected && - test_cmp expected newdir/.git && + git -C newdir init --separate-git-dir ../surrealgitdir && + newdir_git="$(cat newdir/.git)" && + test_cmp_fspath "$(pwd)/surrealgitdir" "${newdir_git#gitdir: }" && test_path_is_dir surrealgitdir/refs && test_path_is_missing realgitdir/refs ' @@ -374,12 +371,9 @@ test_expect_success 're-init to update git link' ' test_expect_success 're-init to move gitdir' ' rm -rf newdir realgitdir surrealgitdir && git init newdir && - ( - cd newdir && - git init --separate-git-dir ../realgitdir - ) && - echo "gitdir: $(pwd)/realgitdir" >expected && - test_cmp expected newdir/.git && + git -C newdir init --separate-git-dir ../realgitdir && + newdir_git="$(cat newdir/.git)" && + test_cmp_fspath "$(pwd)/realgitdir" "${newdir_git#gitdir: }" && test_path_is_dir realgitdir/refs ' |