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

short form of fetchGit assumes master branch exists #4456

Closed
abathur opened this issue Jan 17, 2021 · 9 comments · Fixed by #4638
Closed

short form of fetchGit assumes master branch exists #4456

abathur opened this issue Jan 17, 2021 · 9 comments · Fixed by #4638
Labels

Comments

@abathur
Copy link
Member

abathur commented Jan 17, 2021

Describe the bug

The ~short fetchGit url form assumes master branch exists, and errors with fatal: couldn't find remote ref refs/heads/master if it doesn't.

Steps To Reproduce

  1. nix-shell -E 'fetchGit https://github.com/abathur/lilgit'

Expected behavior

If it's tractable to look up the HEAD in the remote repo and fetch it, that seems better. But it wouldn't shock me if that's not tractable. :)

nix-env --version output
nix-env (Nix) 2.4pre20201205_a5d85d0

@stale
Copy link

stale bot commented Jul 16, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Jul 16, 2021
@SuperSandro2000
Copy link
Member

@stale stale bot removed the stale label Jul 22, 2021
@abathur
Copy link
Member Author

abathur commented Jul 22, 2021

Switch the master in https://github.com/NixOS/nix/blob/master/src/libfetchers/git.cc#L288 for HEAD?

I think that's part of it. At least, the proposed fix in #4638 appears to do this.

@abathur abathur changed the title short from of fetchGit assumes master branch exists short form of fetchGit assumes master branch exists Aug 18, 2021
@GuillaumeDesforges
Copy link
Contributor

This issue blocks building with haskell.nix when some Haskell dependency is pulled from git and there is no master branch.

@stale
Copy link

stale bot commented Apr 18, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Apr 18, 2022
@abathur
Copy link
Member Author

abathur commented Apr 18, 2022

:)

@stale stale bot removed the stale label Apr 18, 2022
@GuillaumeDesforges
Copy link
Contributor

#4638 is still active indeed

@GuillaumeDesforges
Copy link
Contributor

Congrats @orbekk on fixing this! 🎉

@orbekk
Copy link
Contributor

orbekk commented May 10, 2022

@GuillaumeDesforges Thank you =)

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