fetchGit: fix "fatal: couldn't find remote ref refs/heads/master" issue with submodules
This commit is contained in:
parent
cc4fe977e5
commit
002a3a95dc
|
@ -179,7 +179,7 @@ GitInfo exportGit(ref<Store> store, const std::string & uri,
|
|||
|
||||
runProgram("git", true, { "init", tmpDir, "--separate-git-dir", tmpGitDir });
|
||||
runProgram("git", true, { "-C", tmpDir, "fetch", "--quiet", "--force",
|
||||
"--", cacheDir, fmt("%s:%s", *ref, *ref) });
|
||||
"--", cacheDir, fmt("%s", *ref) });
|
||||
|
||||
runProgram("git", true, { "-C", tmpDir, "checkout", "--quiet", "FETCH_HEAD" });
|
||||
runProgram("git", true, { "-C", tmpDir, "remote", "add", "origin", uri });
|
||||
|
|
Loading…
Reference in a new issue