marlonrichert / zsh-snap

⚡️ Znap! Fast, easy-to-use tools for Zsh dotfiles & plugins, plus git repos
MIT License
1.31k stars 38 forks source link

znap pull errors #202

Closed lfportal closed 1 year ago

lfportal commented 1 year ago

Describe the bug

When running znap pull, the command doesn't execute successfully (no repos are updated), with the following error output:

❯ znap pull
From https://github.com/marlonrichert/zsh-autocomplete
 * branch            main       -> FETCH_HEAD
BUG: run-command.c:1521: you must provide a non-zero number of processes!
From https://github.com/lukechilds/zsh-better-npm-completion
 * branch            master     -> FETCH_HEAD
BUG: run-command.c:1521: you must provide a non-zero number of processes!
From https://github.com/zsh-users/zsh-completions
 * branch            master     -> FETCH_HEAD
BUG: run-command.c:1521: you must provide a non-zero number of processes!
From https://github.com/lukechilds/zsh-nvm
 * branch            master     -> FETCH_HEAD
BUG: run-command.c:1521: you must provide a non-zero number of processes!
From https://github.com/marlonrichert/zsh-snap
 * branch            main       -> FETCH_HEAD
BUG: run-command.c:1521: you must provide a non-zero number of processes!
From https://github.com/zsh-users/zsh-syntax-highlighting
 * branch            master     -> FETCH_HEAD
BUG: run-command.c:1521: you must provide a non-zero number of processes!

If memory serves me correctly I may have updated git to the latest version (at the time 2.39.0) before this started to happen.

Steps To Reproduce

The relevant part of my ~/.gitconfig:

[maintenance]
    repo = /Users/wasabi/Terminal/zsh-snap
    repo = /Users/wasabi/Terminal/zsh-autocomplete
    repo = /Users/wasabi/Terminal/zsh-nvm
    repo = /Users/wasabi/Terminal/zsh-syntax-highlighting
    repo = /Users/wasabi/Terminal/zsh-completions
    repo = /Users/wasabi/Terminal/aws-plugin-zsh
    repo = /Users/wasabi/Terminal/zsh-better-npm-completion

My git version:

❯ git --version
git version 2.39.0

Command:

znap pull

Expected behavior

Repos update without errors.

Observed behavior

Repos not updated with an error output (see above description).

Environment:

Additional context

mattbanks commented 1 year ago

Also seeing these issues and also updated git with brew before it happened as well

euglevi commented 1 year ago

I have the exact same error but I honestly do not remember if I have updated git. I am running on Debian unstable with git version 2.39.0.

bbholty1 commented 1 year ago

Hitting the same issue running in MSYS2 on windows.

git version 2.39.0

killhellokitty commented 1 year ago

Same issue here.
git version 2.39.0

cjhardekopf commented 1 year ago

This error is apparently because git changed its behavior when someone uses "--jobs=0" (the change is in commit https://github.com/git/git/commit/51243f9f0f6a932ea579fd6f8014b348f8c2a523). For some reason zsh-snap is setting this option.

cjhardekopf commented 1 year ago

It looks like zsh-snap started setting "-j0" on fetch in commit https://github.com/marlonrichert/zsh-snap/pull/192/commits/251aba09dd26cf709e3168c34c7530ee892ded7c in order to address some other issue. This clearly needs to be changed to work with the current version of git.

Pilgrim1379 commented 1 year ago

This issue still persist unfortunately despite the commit 4a5b447bc4e43810fbfd931bae4c1be11a9ffdc9.

As an aside, I switched to sheldon plugin manager when this particular issue came up as I was concerned about not being able to update plugins using znap pull. Just know that between zsh-snap and sheldon boy your plugin is so fast. With sheldon, loading the same number of plugins, I had to wait about 3 secs to see a prompt and with zsh-snap about 1 sec. Thank you!

soifou commented 1 year ago

@thepreacher I think the related commit is 345ad82 and has not been merged yet into main. You need to switch to the dev branch to see the issue fixed.

mattbanks commented 1 year ago

Hopefully this gets merged into main soon!

Pilgrim1379 commented 1 year ago

Thanks @soifou yes I've switched to the dev branch and it's definately fixed there. I'll stick to the dev branch for now and revert when it gets merged into main.

Pilgrim1379 commented 1 year ago

This issue is now fixed with commit ea769c70f7aaf00f438739cbeaddf88b073f5017 to main branch. Thanks @marlonrichert.

marlonrichert commented 1 year ago

Just know that between zsh-snap and sheldon boy your plugin is so fast. With sheldon, loading the same number of plugins, I had to wait about 3 secs to see a prompt and with zsh-snap about 1 sec. Thank you!

Thanks, that's great to hear! 🤗