download_strategy: disable Git fsmonitor

Enabling the fsmonitor isn't useful for these repositories. Moreover,
disabling them will get rid of the warning shown from trying to copy
sockets from a repo watched by the fsmonitor.
This commit is contained in:
Carlo Cabrera 2023-04-23 16:42:58 +08:00
parent 4ddebd9bd5
commit 35a8a5dd3d
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -915,7 +915,8 @@ class GitDownloadStrategy < VCSDownloadStrategy
args << "--no-checkout" << "--filter=blob:none" if partial_clone_sparse_checkout?
args << "-c" << "advice.detachedHead=false" # silences detached head warning
args << "--config" << "advice.detachedHead=false" # silences detached head warning
args << "--config" << "core.fsmonitor=false" # prevent fsmonitor from watching this repo
args << @url << cached_location.to_s
end
@ -948,6 +949,9 @@ class GitDownloadStrategy < VCSDownloadStrategy
command! "git",
args: ["config", "advice.detachedHead", "false"],
chdir: cached_location
command! "git",
args: ["config", "core.fsmonitor", "false"],
chdir: cached_location
return unless partial_clone_sparse_checkout?