summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-02-25 16:43:32 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-25 16:43:32 -0800
commitd166e8c1d4cb35dec960c4f69ccc23d2fedb322a (patch)
treef29c0d023737722d891005ff41a5f81bbc5d852e /t
parentMerge branch 'mt/add-chmod-fixes' (diff)
parentmaintenance: fix incorrect `maintenance.repo` path with bare repository (diff)
downloadtgif-d166e8c1d4cb35dec960c4f69ccc23d2fedb322a.tar.xz
Merge branch 'es/maintenance-of-bare-repositories'
The "git maintenance register" command had trouble registering bare repositories, which had been corrected. * es/maintenance-of-bare-repositories: maintenance: fix incorrect `maintenance.repo` path with bare repository
Diffstat (limited to 't')
-rwxr-xr-xt/t7900-maintenance.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index 286b18db3c..2412d8c5c0 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -632,4 +632,17 @@ test_expect_success 'fails when running outside of a repository' '
nongit test_must_fail git maintenance unregister
'
+test_expect_success 'register and unregister bare repo' '
+ test_when_finished "git config --global --unset-all maintenance.repo || :" &&
+ test_might_fail git config --global --unset-all maintenance.repo &&
+ git init --bare barerepo &&
+ (
+ cd barerepo &&
+ git maintenance register &&
+ git config --get --global --fixed-value maintenance.repo "$(pwd)" &&
+ git maintenance unregister &&
+ test_must_fail git config --global --get-all maintenance.repo
+ )
+'
+
test_done