-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fetchGit fails when trying to fetch from a repository that doesn't have master #1923
Comments
I suspect this means that fetchgit on a url with a default branch other than master won't work. IIRC the code sets ref to master if not otherwise set. Perhaps this should be "HEAD" instead? (untested) |
Yes, problem happens with bare URL too, as in
This would change the behavior but AFAICT it's not documented to prefer "master" so hopefully that's not a problem. Change is trivial if it's what we want: dtzWill@51efd3b |
Thanks for the quick diagnosis. I guess there is a strong argument for |
I've been seeing an issue that may be related, For example, this is the output when trying to fetch a revision from a different branch:
|
Can be reproduced like this using some old unmerged
|
I've got the same issue with |
@shlevy could this be re-opened? |
|
I think I also ran into this (see also: https://cl.tvl.fyi/c/depot/+/4552/1):
in |
I know this is closed, but for anyone else who lost their sanity trying to fix: $ nix-shell default.nix
error: executing 'git': No such file or directory
error: program 'git' failed with exit code 1 check if your nix shell or local machine has git installed $ nix-shell -p git
$ nix-shell default.nix |
When trying to fetch a git revision of a repository that doesn't have a master branch, I get the following error
Example:
This can be resolved by additionally specifying the branch which includes the commit as
ref
:While the issue itself is solvable via specifying the
ref
, this behavior is however rather surprising.The text was updated successfully, but these errors were encountered: