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

Error fetching repos that don't have a master branch #22

Open
afabian opened this issue Nov 9, 2023 · 2 comments
Open

Error fetching repos that don't have a master branch #22

afabian opened this issue Nov 9, 2023 · 2 comments

Comments

@afabian
Copy link

afabian commented Nov 9, 2023

We have a repository with various branches, but none called "master". It looks like that branch name is getting added and causing checkouts to fail:

2023-11-09 09:59:08 Command 'C:\Users\afabian\AppData\Local\Programs\Git\cmd\git.exe -c lfs.storage=c:\gitcache\cache\mirrors\REPO_PATH\lfs lfs fetch origin master' failed with return code 2. Starting retry 2 of 3.
Invalid ref argument: [master]

I think the expected behavior is to check out the ref specified by the parent repository. Come to think of it, "master" would be wrong even if it did exist.

Edit: just realized I said "checkouts" but the actual command was "submodule update --init --recursive"

@afabian
Copy link
Author

afabian commented Nov 9, 2023

Awesome tool, by the way!

@seeraven
Copy link
Owner

The default branch resp. ref should be determined by calling git symbolic-ref --short HEAD or by using git show-ref <ref> if used within the git checkout <ref> context. So if you are using a recent version of gitcache, there is no hard-coded "master" in it.
Can you check the output of the git symbolic-ref --short HEAD command?
I would like to recreate an example repo simulating your use case. I assume you have a repository with one or more submodules (which in turn have again submodules) and at least some of them are using LFS, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants