Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-fetch-with-cli: Set GIT_DIR for bare repository compatibility
When using `net.git-fetch-with-cli = true` , Cargo fails to clone the git repository into the cache because `safe.bareRepository` defaults to `explicit`. This results in an error stating that a bare repository cannot be used. This patch sets the `GIT_DIR` environment variable to the correct repository path instead of removing it. This ensures that Git uses the correct repository directory and avoids the "cannot use bare repository" error. Fixes #14758 Signed-off-by: Charalampos Mitrodimas <charmitro@posteo.net>
- Loading branch information