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

Documentation missing: Subdirectories are cloned to temp directory #493

Open
mss opened this issue Jun 3, 2024 · 0 comments
Open

Documentation missing: Subdirectories are cloned to temp directory #493

mss opened this issue Jun 3, 2024 · 0 comments
Labels

Comments

@mss
Copy link

mss commented Jun 3, 2024

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://git@git.example.com/
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