I set clone.defaultRemoteName = root in .gitconfig because I like the tree imagery. This means that when zinit pulls down itself and any plugins, their fetch remotes are "root" rather than "origin". This rubs against a hardcoded assumption in the self-update logic that the fetch remote is always "origin", and it simply fails to run, immediately erroring.
Steps to reproduce
Start without zinit installed
git config --global clone.defaultRemoteName root
Install zinit
zinit self-update
Relevant output
[self-update] fetching latest changes from main branch
fatal: ambiguous argument '..origin/HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
[self-update] compiling zinit via zcompile
[self-update] reloading zinit for the current session
What happened?
I set
clone.defaultRemoteName = root
in.gitconfig
because I like the tree imagery. This means that when zinit pulls down itself and any plugins, their fetch remotes are "root" rather than "origin". This rubs against a hardcoded assumption in theself-update
logic that the fetch remote is always "origin", and it simply fails to run, immediately erroring.Steps to reproduce
git config --global clone.defaultRemoteName root
zinit self-update
Relevant output
Screenshots and recordings
No response
Operating System & Version
OS: linux-gnu | Vendor: redhat | Machine: x86_64 | CPU: x86_64 | Processor: x86_64 | Hardware: x86_64
Zsh version
zsh 5.9 (x86_64-redhat-linux-gnu)
Terminal emulator
kitty, xterm-kitty
If using WSL on Windows, which version of WSL
None
Additional context
No response
Code of Conduct