mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
GitRepo::fetch(): Ignore $GIT_DIR
Fixes #12325.
(cherry picked from commit 41983dba8f
)
This commit is contained in:
parent
4511c47ab7
commit
1a402db046
1 changed files with 1 additions and 1 deletions
|
@ -417,7 +417,7 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this<GitRepoImpl>
|
|||
// then use code that was removed in this commit (see blame)
|
||||
|
||||
auto dir = this->path;
|
||||
Strings gitArgs{"-C", dir.string(), "fetch", "--quiet", "--force"};
|
||||
Strings gitArgs{"-C", dir.string(), "--git-dir", ".", "fetch", "--quiet", "--force"};
|
||||
if (shallow)
|
||||
append(gitArgs, {"--depth", "1"});
|
||||
append(gitArgs, {std::string("--"), url, refspec});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue