marlonrichert / zsh-snap

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

Handle missing upstream commit causes issues with some repos #226

Closed chrishoage closed 1 year ago

chrishoage commented 1 year ago

Describe the bug

As of commit https://github.com/marlonrichert/zsh-snap/commit/9b8edd89c2b2303ffa253c5116a97d9138e0831d there is now unexpected output during znap pull

Steps To Reproduce

Checkout https://github.com/marlonrichert/zsh-snap/commit/9b8edd89c2b2303ffa253c5116a97d9138e0831d

❯ znap pull
fz ..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch
..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch
..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch
..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch
..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch
..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch
..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch
..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch
..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch
✓
ohmyzsh ✓
pure ✓
z ✓
zsh-bd ✓
zsh-completions ✓
zsh-hist ✓
zsh-history-substring-search ✓
zsh-syntax-highlighting ✓

~/dotfiles/terminal/.znap main
❯ git checkout dd3fab0e5fb1965f962d87df7f5933b6ad94d06f

~/dotfiles/terminal/.znap main~1
❯ znap pull
fz ✓
ohmyzsh ✓
pure ✓
z ✓
zsh-bd ✓
zsh-completions ✓
zsh-hist ✓
zsh-history-substring-search ✓
zsh-syntax-highlighting ✓

Expected behavior

No output

..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch

Observed behavior

..znap.fetch:6: array parameter upstream set in enclosing scope in function ..znap.fetch

During znap pull on some repos`

Environment:

Additional context

Repo in question is https://github.com/changyuheng/fz.sh

znap source changyuheng/fz
marlonrichert commented 1 year ago

Fixed