aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-05-15 09:52:55 -0700
committerJunio C Hamano <gitster@pobox.com>2024-05-15 09:52:55 -0700
commit1e00d22ec514fdb1056314da4e8a4e2ce2d53ddd (patch)
tree3b0baef0d6edae8dc5128e6cf8dadbac8bfc9643 /t
parentMerge branch 'vd/doc-merge-tree-x-option' (diff)
parentscalar: avoid segfault in reconfigure --all (diff)
downloadgit-1e00d22ec514fdb1056314da4e8a4e2ce2d53ddd.tar.gz
git-1e00d22ec514fdb1056314da4e8a4e2ce2d53ddd.zip
Merge branch 'ds/scalar-reconfigure-all-fix'
Scalar fix. * ds/scalar-reconfigure-all-fix: scalar: avoid segfault in reconfigure --all
Diffstat (limited to 't')
-rwxr-xr-xt/t9210-scalar.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh
index 428339e342..a41b4fcc08 100755
--- a/t/t9210-scalar.sh
+++ b/t/t9210-scalar.sh
@@ -180,6 +180,44 @@ test_expect_success 'scalar reconfigure' '
test true = "$(git -C one/src config core.preloadIndex)"
'
+test_expect_success 'scalar reconfigure --all with includeIf.onbranch' '
+ repos="two three four" &&
+ for num in $repos
+ do
+ git init $num/src &&
+ scalar register $num/src &&
+ git -C $num/src config includeif."onbranch:foo".path something &&
+ git -C $num/src config core.preloadIndex false || return 1
+ done &&
+
+ scalar reconfigure --all &&
+
+ for num in $repos
+ do
+ test true = "$(git -C $num/src config core.preloadIndex)" || return 1
+ done
+'
+
+ test_expect_success 'scalar reconfigure --all with detached HEADs' '
+ repos="two three four" &&
+ for num in $repos
+ do
+ rm -rf $num/src &&
+ git init $num/src &&
+ scalar register $num/src &&
+ git -C $num/src config core.preloadIndex false &&
+ test_commit -C $num/src initial &&
+ git -C $num/src switch --detach HEAD || return 1
+ done &&
+
+ scalar reconfigure --all &&
+
+ for num in $repos
+ do
+ test true = "$(git -C $num/src config core.preloadIndex)" || return 1
+ done
+'
+
test_expect_success '`reconfigure -a` removes stale config entries' '
git init stale/src &&
scalar register stale &&