summaryrefslogtreecommitdiff
path: root/t/t1900-repo.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1900-repo.sh')
-rwxr-xr-xt/t1900-repo.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t1900-repo.sh b/t/t1900-repo.sh
index be8a4b2499..b0438d276e 100755
--- a/t/t1900-repo.sh
+++ b/t/t1900-repo.sh
@@ -38,6 +38,23 @@ test_repo_info 'ref format files is retrieved correctly' \
test_repo_info 'ref format reftable is retrieved correctly' \
'git init --ref-format=reftable' 'format-reftable' 'references.format' 'reftable'
+test_repo_info 'bare repository = false is retrieved correctly' \
+ 'git init' 'nonbare' 'layout.bare' 'false'
+
+test_repo_info 'bare repository = true is retrieved correctly' \
+ 'git init --bare' 'bare' 'layout.bare' 'true'
+
+test_expect_success 'values returned in order requested' '
+ cat >expect <<-\EOF &&
+ layout.bare=false
+ references.format=files
+ layout.bare=false
+ EOF
+ git init --ref-format=files ordered &&
+ git -C ordered repo info layout.bare references.format layout.bare >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'git-repo-info fails if an invalid key is requested' '
echo "error: key ${SQ}foo${SQ} not found" >expect &&
test_must_fail git repo info foo 2>actual &&