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

builtins.fetchGit doesn't work with refs/tags/foo anymore. #3687

Closed
Fuuzetsu opened this issue Jun 12, 2020 · 7 comments
Closed

builtins.fetchGit doesn't work with refs/tags/foo anymore. #3687

Fuuzetsu opened this issue Jun 12, 2020 · 7 comments
Labels

Comments

@Fuuzetsu
Copy link
Member

Describe the bug

The manual describes how to fetch a tag from a git repository with builtins.fetchGit:

builtins.fetchGit {
  url = "https://github.com/nixos/nix.git";
  ref = "refs/tags/1.9";
}

This used to work, until recently.

Steps To Reproduce

Build recent nix and run try running the example from the manual:

$ nix repl
Welcome to Nix version 2.4pre7534_b92f58f6. Type :? for help.

nix-repl> builtins.fetchGit { url = "https://github.com/nixos/nix.git"; ref = "refs/tags/1.9"; }
error: invalid Git branch/tag name 'refs/tags/1.9'

Expected behavior

Works as it has before: downloads the tag.

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

Additional context

As the manual hasn't been updated, it seems like an accidental breakage?

@Fuuzetsu Fuuzetsu added the bug label Jun 12, 2020
@Fuuzetsu
Copy link
Member Author

Hm, I just found #3642 and #3612

Perhaps this is fixed though I don't have most recent nix to check.

@stale
Copy link

stale bot commented Feb 13, 2021

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

@stale stale bot added the stale label Feb 13, 2021
@Fuuzetsu
Copy link
Member Author

Still needs verifying.

@stale stale bot removed the stale label Feb 14, 2021
@stale
Copy link

stale bot commented Aug 13, 2021

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

@stale stale bot added the stale label Aug 13, 2021
@Fuuzetsu
Copy link
Member Author

Still needs verifying.

@stale stale bot removed the stale label Aug 16, 2021
@Kha
Copy link
Contributor

Kha commented Aug 16, 2021

works

Welcome to Nix version 2.4pre20210810. Type :? for help.

nix-repl> builtins.fetchGit {
            url = "https://github.com/nixos/nix.git";
            ref = "refs/tags/1.9";
          }
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
{ lastModified = 1434099760; lastModifiedDate = "20150612090240"; narHash = "sha256-Zw51mnr2Mzij+Jd+k3uY1vU1z56CLGEt9uNjzmpwJM0="; outPath = "/nix/store/6kck7gndz938plhhmm7g91l9mwyzpa0g-source"; rev = "39b3d9698e8c0972d7d54c4007c4a2e6e680b3d3"; revCount = 4162; shortRev = "39b3d96"; submodules = false; }

@Fuuzetsu
Copy link
Member Author

Thank you, closing.

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