Skip to content

Documentation missing: Subdirectories are cloned to temp directory #493

@mss

Description

@mss

When one uses the double-slash syntax to retrieve only a subdirectory the Git repository is first cloned to the temp directory and then the relevant parts are copied over to the final destination. This is not documented.

The next section Checksumming has some extensive documentation on how the temp directory is picked up which I'd just move up to the Subdirectories section where it is more relevant.

Why is this relevant? Because Git config can be dependent on the $GIT_DIR and thus some config does not work as expected (which is additionally confusing because it works in Terraform which does its own double-slash parsing).

For a real-world example, let's take this Git config snippet:

[includeIf "gitdir:~/code/work/"]
    path = ~/.config/git/work.config 

And combine it with something relevant for cloning (through a VPN/Proxy in this case) in ~/.config/git/work.config like this:

[url "https://git.example.com/scm/"]
    insteadOf = ssh://[email protected]/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions