You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# /tmp; git init repo
Initialized empty Git repository in /private/tmp/repo/.git/
# /tmp;cd repo
# /tmp/repo; git commit --allow-empty -m 'empty'
[master (root-commit) ca4f799] empty
# /tmp/repo; git config core.bare true# /tmp/repo; git status
fatal: this operation must be run in a work tree
# /tmp/repo; gix status
23:58:05 status done 0.0 files in 0.00s (0.0 files/s)
head -> index isn't implemented yet
By default, the repository config file is shared across all worktrees. If the config variables core.bare or core.worktree are present in the common config file and extensions.worktreeConfig is disabled, then they will be applied to the main worktree only.
In order to have worktree-specific configuration, you can turn on the worktreeConfig extension, [...]
I couldn't care less about the worktreeConfig extension, seems pretty niche. But "applied to the main worktree only" is the important part.
Steps to reproduce 🕹
See above
The text was updated successfully, but these errors were encountered:
Thanks a lot for letting me know. I do remember vaguely that I was quite 'flexible' when implementing this, but it felt like for good reason related to worktrees maybe.
Let me try once more, with some additional tests it should be possible to finally get the correct behaviour.
Current behavior 😯
And
should print None, but it's
Some("/tmp/repo")
.Expected behavior 🤔
Gix status should not succeed. Also,
Repository::work_dir()
should be None.Git behavior
Refuses to do worktree-related things if core.bare=true. But please note that core.bare=true is generally not respected when opening the repo from a worktree: https://git-scm.com/docs/git-worktree#_configuration_file
I couldn't care less about the worktreeConfig extension, seems pretty niche. But "applied to the main worktree only" is the important part.
Steps to reproduce 🕹
See above
The text was updated successfully, but these errors were encountered: