Skip to content

flakes: incorrectly rejects valid Git branch/tag names #3612

@emilazy

Description

@emilazy

Describe the bug

Nix on the flakes branch incorrectly rejects Git ref names with / in them.

Steps to reproduce

emily@renko ~> nix build --no-link 'github:NixOS/nixpkgs?ref=pull/88692/head'#pkgsMusl.libusb1
error: GitHub URL 'github:NixOS/nixpkgs?ref=pull/88692/head#pkgsMusl.libusb1' contains an invalid branch/tag name

Expected behaviour

Nix should accept everything the GitHub API/git fetch does; https://api.github.com/repos/NixOS/nixpkgs/commits/pull/88692/head works, so this should too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions