Merge pull request #12510 from boblail/lail/silence-advice.detachedHead-always
Silence the detachedHead warning when ref_type is a revision
This commit is contained in:
commit
371122da55
@ -883,9 +883,9 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
|||||||
case @ref_type
|
case @ref_type
|
||||||
when :branch, :tag
|
when :branch, :tag
|
||||||
args << "--branch" << @ref
|
args << "--branch" << @ref
|
||||||
args << "-c" << "advice.detachedHead=false" # silences detached head warning
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
args << "-c" << "advice.detachedHead=false" # silences detached head warning
|
||||||
args << @url << cached_location
|
args << @url << cached_location
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -915,6 +915,9 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
|||||||
command! "git",
|
command! "git",
|
||||||
args: ["config", "remote.origin.tagOpt", "--no-tags"],
|
args: ["config", "remote.origin.tagOpt", "--no-tags"],
|
||||||
chdir: cached_location
|
chdir: cached_location
|
||||||
|
command! "git",
|
||||||
|
args: ["config", "advice.detachedHead", "false"],
|
||||||
|
chdir: cached_location
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { params(timeout: T.nilable(Time)).void }
|
sig { params(timeout: T.nilable(Time)).void }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user