Skip to content

Commit c76ac9d

Browse files
committed
Add argument to skip fetching the latest remote source
1 parent 93a62c7 commit c76ac9d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

RELEASE_NOTES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2019-05-23
2+
----------
3+
4+
- Add `--skip-fetch` argument that skips fetching the latest remote source
5+
16
2019-05-13
27
----------
38

bin/gbuild

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ OptionParser.new do |opts|
196196
opts.on("-o", "--cache-read-only", "only use existing cache files, do not update them") do |v|
197197
@options[:cache_ro] = v
198198
end
199+
opts.on("--skip-fetch", "skip fetching the latest git objects and refs from the remote source") do |v|
200+
@options[:skip_fetch] = v
201+
end
199202
end.parse!
200203

201204
if !ENV["USE_LXC"] and !ENV["USE_DOCKER"] and !ENV["USE_VBOX"] and !File.exist?("/dev/kvm")
@@ -288,6 +291,8 @@ build_desc["remotes"].each do |remote|
288291
commit = sanitize(remote["commit"], remote["commit"])
289292
unless File.exist?("inputs/#{dir}")
290293
system!("git init inputs/#{dir}")
294+
end
295+
if !@options[:skip_fetch]
291296
system!("cd inputs/#{dir} && git fetch --update-head-ok #{sanitize_path(remote["url"], remote["url"])} +refs/tags/*:refs/tags/* +refs/heads/*:refs/heads/*")
292297
system!("cd inputs/#{dir} && git checkout -q #{commit}")
293298
system!("cd inputs/#{dir} && git submodule update --init --recursive --force")

0 commit comments

Comments
 (0)