diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-02-14 17:53:48 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-14 17:53:48 -0800 |
| commit | 09e74b06ea68d4cac8f08b51bf4db2daf1987ae2 (patch) | |
| tree | 8389be0fe6f9c8fa96f01e436a369cca530487fc /t | |
| parent | Merge branch 'tc/clone-single-revision' (diff) | |
| parent | worktree: detect from secondary worktree if main worktree is bare (diff) | |
| download | git-09e74b06ea68d4cac8f08b51bf4db2daf1987ae2.tar.gz git-09e74b06ea68d4cac8f08b51bf4db2daf1987ae2.zip | |
Merge branch 'op/worktree-is-main-bare-fix'
Going into a secondary worktree and asking "is the main worktree
bare?" did not work correctly when per-worktree configuration
option was in use, which has been corrected.
* op/worktree-is-main-bare-fix:
worktree: detect from secondary worktree if main worktree is bare
Diffstat (limited to 't')
| -rwxr-xr-x | t/t3200-branch.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index a3a21c54cf..f3e720dc10 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -410,6 +410,20 @@ test_expect_success 'bare main worktree has HEAD at branch deleted by secondary git -C secondary branch -D main ' +test_expect_success 'secondary worktrees recognize core.bare=true in main config.worktree' ' + test_when_finished "rm -rf bare_repo non_bare_repo secondary_worktree" && + git init -b main non_bare_repo && + test_commit -C non_bare_repo x && + + git clone --bare non_bare_repo bare_repo && + git -C bare_repo config extensions.worktreeConfig true && + git -C bare_repo config unset core.bare && + git -C bare_repo config --worktree core.bare true && + + git -C bare_repo worktree add ../secondary_worktree && + git -C secondary_worktree checkout main +' + test_expect_success 'git branch --list -v with --abbrev' ' test_when_finished "git branch -D t" && git branch t && |
