Skip to content

Commit 76199b0

Browse files
committed
Add test for paths.git_dir consistency
Add test to verify paths.git_dir matches rev-parse --git-dir
1 parent be15df6 commit 76199b0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/t1900-repo-info.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,14 @@ test_expect_success 'git repo info --keys uses lines as its default output forma
149149
test_cmp expect actual
150150
'
151151

152+
test_expect_success 'paths.git_dir matches rev-parse --git-dir' '
153+
git init repo &&
154+
(
155+
cd repo &&
156+
git repo info paths.git_dir >actual &&
157+
echo "paths.git_dir=$(git rev-parse --git-dir)" >expect &&
158+
test_cmp expect actual
159+
)
160+
'
161+
152162
test_done

0 commit comments

Comments
 (0)