Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update git repos where default branch name has '/' #283

Open
ealap opened this issue Apr 17, 2024 · 0 comments · May be fixed by #284
Open

Unable to update git repos where default branch name has '/' #283

ealap opened this issue Apr 17, 2024 · 0 comments · May be fixed by #284
Labels
bug Something isn't working

Comments

@ealap
Copy link

ealap commented Apr 17, 2024

Describe the bug

znap pull fails when a plugin repo has a default branch that has '/' in its name.

Steps To Reproduce

1. znap source 'ealap/zsh-abbr' # default branch is 'dev/ealap/main'
2. znap pull

Expected behavior

znap pull can successfully update the plugin

Observed behavior

An error occurs.

ealap/zsh-abbr couldn't find remote ref dev
no upstream

It seems to be only using the string before the first '/'

Environment:

  • OS: macOS, debian
  • Terminal: alacritty
  • Zsh version: 5.9
  • Repo version: main f8685ea

Additional context

A quick scan of the code tells me the problem likely comes from here but I don't understand it fully yet.
https://github.com/marlonrichert/zsh-snap/blame/f8685ea5933335ea4cbd54780ace16ef85c346bd/functions/..znap.fetch#L12

Workaround for me now is to just use a simple branch name as default for my forked repos.

@ealap ealap added the bug Something isn't working label Apr 17, 2024
ealap added a commit to ealap/zsh-snap that referenced this issue Apr 17, 2024
@ealap ealap linked a pull request Apr 17, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant