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

fetchGit only works on non-annotated tags #2385

Closed
graham-at-target opened this issue Aug 31, 2018 · 0 comments
Closed

fetchGit only works on non-annotated tags #2385

graham-at-target opened this issue Aug 31, 2018 · 0 comments

Comments

@graham-at-target
Copy link
Contributor

The following works:

(import <nixpkgs> {}).stdenv.mkDerivation {
  name = "hi";
  src = builtins.fetchGit {
    url = "https://github.com/nixos/nix.git";
    ref = "tags/1.9";
  };
}

But this doesn't:

(import <nixpkgs> {}).stdenv.mkDerivation {
  name = "hi";
  src = builtins.fetchGit {
    url = "https://github.com/nixos/nix.git";
    ref = "tags/2.0";
  };
}

1.9 isn't an annotated tag:

[nix-shell:~/projects/nix]$ git show 1.9
commit 39b3d9698e8c0972d7d54c4007c4a2e6e680b3d3 (tag: 1.9)
Author: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date:   Fri Jun 12 11:02:40 2015 +0200

    Typos

but 2.0 is:

$ git show 2.0
tag 2.0
Tagger: Eelco Dolstra <edolstra@gmail.com>
Date:   Thu Feb 22 16:40:21 2018 +0100

Tagging release 2.0
-----BEGIN PGP SIGNATURE-----

iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAlqO5GUTHGVkb2xzdHJh
QGdtYWlsLmNvbQAKCRCBcLRybXGY3kFnB/9+SXZx0DWt1iDXtp2sVH08OC5097fg
zOE1MJXIMpn1EVPmFjrTUiTThlO0GVZTXK1abxTq2MLZ2e5CpXZHzMqmIiR4axWa
jwYwG3/beIFF1RBwBma3Yc7M7vN95Eyp1YderMFZSY9qk9/0OGyXc9LZHvyaQYUX
NbNkuoHHr3qM2jYrebehDxIUNN0VfA43s4Jrci5MR8OXM8/xFk82BzVyeTmocwut
b46NBLobRXwlRktTZNXrx2wJeY7JluASHpcTAdmBlntpKTUpvkGN/9hOQ1lZUMjj
+jUB9PIOHUx0gE1QhiUplpmYCPF4B0Fx43Ek0Le3C1pDUC37+BsUX1mt
=AbBN
-----END PGP SIGNATURE-----

commit 179b896acb6deb8fea9614dfbddeaf3b23797bf5 (tag: 2.0)
Merge: e8d53bfd ddbcd01c
Author: Eelco Dolstra <edolstra@gmail.com>
Date:   Thu Feb 22 14:20:43 2018 +0100
p01arst0rm pushed a commit to p01arst0rm/nix that referenced this issue Oct 2, 2019
With the merge of NixOS#2582, the syntax "tags/1.9" for refs does not work
anymore.
However, the new syntax "refs/tags/1.9" seems to support annotated tags,
such as "refs/tags/2.0".

Closes NixOS#2385.
edolstra pushed a commit that referenced this issue Oct 9, 2019
With the merge of #2582, the syntax "tags/1.9" for refs does not work
anymore.
However, the new syntax "refs/tags/1.9" seems to support annotated tags,
such as "refs/tags/2.0".

Closes #2385.

(cherry picked from commit ae244af)
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

1 participant