fetchGit: fix "fatal: couldn't find remote ref refs/heads/master" issue with submodules

This commit is contained in:
Bjørn Forsman 2020-03-16 14:47:21 +01:00 committed by Julian Stecklina
parent cc4fe977e5
commit 002a3a95dc

View file

@ -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 });