1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Suppress detached head warning

This commit is contained in:
Nobuyoshi Nakada 2019-09-07 17:28:05 +09:00
parent ae8b977742
commit 5a6954ba74
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -583,7 +583,7 @@ class VCS
end
def export(revision, url, dir, keep_temp = false)
system(COMMAND, "clone", "-s", (@srcdir || '.').to_s, "-b", url, dir) or return
system(COMMAND, "clone", "-c", "advice.detachedHead=false", "-s", (@srcdir || '.').to_s, "-b", url, dir) or return
system(COMMAND, "fetch", "origin", "+refs/notes/commits:refs/notes/commits", chdir: dir) or return
(Integer === revision ? GITSVN : GIT).new(File.expand_path(dir))
end