Browse Source

Bugfix: Pass --update-head-ok to git fetch to avoid problems overwriting checked out branch

tags/0.1
Luke Dashjr 8 years ago
parent
commit
46b75df3d3
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      bin/gbuild

+ 1
- 1
bin/gbuild View File

@@ -197,7 +197,7 @@ build_desc["remotes"].each do |remote|
unless File.exist?("inputs/#{dir}")
system!("git init inputs/#{dir}")
end
system!("cd inputs/#{dir} && git fetch #{sanitize_path(remote["url"], remote["url"])} +refs/tags/*:refs/tags/* +refs/heads/*:refs/heads/*")
system!("cd inputs/#{dir} && git fetch --update-head-ok #{sanitize_path(remote["url"], remote["url"])} +refs/tags/*:refs/tags/* +refs/heads/*:refs/heads/*")
commit = sanitize(remote["commit"], remote["commit"])
commit = `cd inputs/#{dir} && git log --format=%H -1 #{commit}`.strip
raise "error looking up commit for tag #{remote["commit"]}" unless $?.exitstatus == 0

Loading…
Cancel
Save