Add a fetch ref to the remote, too

We can't add upstream remotes until the remote actually exists, it
seems. So that has to wait until we also create the upstream repo.
This commit is contained in:
Chris de Graaf 2019-10-22 19:24:19 +07:00
parent 1d2810e40c
commit b3449ee272
No known key found for this signature in database
GPG Key ID: 150FFDD9B0073C7B

View File

@ -54,7 +54,7 @@ function prehook(p::Git, t::Template, pkg_dir::AbstractString)
"https://$(t.host)/$(t.user)/$pkg.jl" "https://$(t.host)/$(t.user)/$pkg.jl"
end end
LibGit2.with(GitRemote(repo, "origin", url)) do remote LibGit2.with(GitRemote(repo, "origin", url)) do remote
# TODO: `git pull` still requires some Git branch config. LibGit2.add_fetch!(repo, remote, "refs/heads/master")
LibGit2.add_push!(repo, remote, "refs/heads/master") LibGit2.add_push!(repo, remote, "refs/heads/master")
end end
end end