Skip to content

Commit

Permalink
Pkg2: use git remote update to update cache mirror repos.
Browse files Browse the repository at this point in the history
Thanks, @loladiro -- would never have figured this out.
  • Loading branch information
StefanKarpinski committed Jul 2, 2013
1 parent a96d626 commit e9efe2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/git.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function git(d)
`git --work-tree=$work_tree --git-dir=$git_dir`
end

run(args::Cmd; dir="") = Base.run(`$(git(dir)) $args`)
run(args::Cmd; dir="", out=STDOUT) = Base.run(`$(git(dir)) $args` |> out)
success(args::Cmd; dir="") = Base.success(`$(git(dir)) $args`)
readall(args::Cmd; dir="") = Base.readall(`$(git(dir)) $args`)
readchomp(args::Cmd; dir="") = Base.readchomp(`$(git(dir)) $args`)
Expand Down
2 changes: 1 addition & 1 deletion base/pkg2/cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function prefetch{S<:String}(pkg::String, url::String, sha1s::Vector{S})
Git.run(`config remote.origin.url $url`, dir=cache)
end
if !all(sha1->Git.iscommit(sha1, dir=cache), sha1s)
Git.run(`fetch -q $url`, dir=cache)
Git.run(`remote update`, dir=cache, out=SpawnNullStream())
end
filter(sha1->!Git.iscommit(sha1, dir=cache), sha1s)
end
Expand Down

0 comments on commit e9efe2b

Please sign in to comment.