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 use github pr refs when using git+http #10481

Closed
lolbinarycat opened this issue Apr 12, 2024 · 1 comment
Closed

unable to use github pr refs when using git+http #10481

lolbinarycat opened this issue Apr 12, 2024 · 1 comment
Labels

Comments

@lolbinarycat
Copy link

Describe the bug

the special pull/N/{head,merge} refrences that github creates for each pull request can only be used with github: flakes, not git+http://github.com flakes.

Steps To Reproduce

  1. nix build 'git+https://github.com/NixOS/nixpkgs?ref=pull/303399/merge#cargo-shear'
fatal: couldn't find remote ref refs/heads/pull/303399/merge
error:
       … while fetching the input 'git+https://github.com/NixOS/nixpkgs?ref=pull/303399/merge'

       error: program 'git' failed with exit code 128

Expected behavior
the command should succeed.

nix-env --version output
nix-env (Nix) 2.18.1

Additional context

this could cause problems for programs that want to act generically on git repositories, having to special case github to not use git+http adds unnecessary complexity.

Priorities

Add 👍 to issues you find important.

@thufschmitt
Copy link
Member

You need to use refs/pull/:ID/merge. git does some magic to abstract over branches, tags and arbitrary other references that Nix doesn't replicate.

Closing as a dupe of #3701

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

No branches or pull requests

2 participants