Skip to content

bultins.fetchGit with submodules failes to clone branch . #13215

@ein-shved

Description

@ein-shved

Describe the bug

Trying to use builtins.fetchGit with submodules enabled to clone entire boost project. The .gitmodules file of boost said that branch of submodules are .. I suppose this is means the same branch, as head repo. The fetchGit failed on this.

Steps To Reproduce

❯ nix repl
Nix 2.28.3
Type :? for help.
nix-repl> url="https://github.com/boostorg/boost.git" 

nix-repl> builtins.fetchGit { inherit url; submodules=true; } 
error:
       … while calling the 'fetchGit' builtin
         at «string»:1:1:
            1| builtins.fetchGit { inherit url; submodules=true; }
             | ^

       … while fetching the input 'git+https://github.com/boostorg/boost.git?submodules=1'

       error: invalid Git branch/tag name '.'

Expected behavior

Successful fetching to nix store

Metadata

❯ nix-env --version
nix-env (Nix) 2.28.3

❯ git --version
git version 2.49.0

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfetchingNetworking with the outside (non-Nix) world, input locking
    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