diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-15 09:52:55 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-15 09:52:55 -0700 |
| commit | 1e00d22ec514fdb1056314da4e8a4e2ce2d53ddd (patch) | |
| tree | 3b0baef0d6edae8dc5128e6cf8dadbac8bfc9643 /t | |
| parent | Merge branch 'vd/doc-merge-tree-x-option' (diff) | |
| parent | scalar: avoid segfault in reconfigure --all (diff) | |
| download | git-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-x | t/t9210-scalar.sh | 38 |
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 && |
