Merge pull request #20476 from Homebrew/git-credential-uid
download_strategy: fix UID handling with credential helpers on fetch
This commit is contained in:
commit
4910ac215e
@ -1106,20 +1106,25 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
|||||||
# Convert any shallow clone to full clone
|
# Convert any shallow clone to full clone
|
||||||
if shallow_dir?
|
if shallow_dir?
|
||||||
command! "git",
|
command! "git",
|
||||||
args: ["fetch", "origin", "--unshallow"],
|
args: ["fetch", "origin", "--unshallow"],
|
||||||
chdir: cached_location,
|
chdir: cached_location,
|
||||||
timeout: Utils::Timer.remaining(timeout)
|
timeout: Utils::Timer.remaining(timeout),
|
||||||
|
reset_uid: true
|
||||||
else
|
else
|
||||||
command! "git",
|
command! "git",
|
||||||
args: ["fetch", "origin"],
|
args: ["fetch", "origin"],
|
||||||
chdir: cached_location,
|
chdir: cached_location,
|
||||||
timeout: Utils::Timer.remaining(timeout)
|
timeout: Utils::Timer.remaining(timeout),
|
||||||
|
reset_uid: true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { override.params(timeout: T.nilable(Time)).void }
|
sig { override.params(timeout: T.nilable(Time)).void }
|
||||||
def clone_repo(timeout: nil)
|
def clone_repo(timeout: nil)
|
||||||
command! "git", args: clone_args, timeout: Utils::Timer.remaining(timeout)
|
command! "git",
|
||||||
|
args: clone_args,
|
||||||
|
timeout: Utils::Timer.remaining(timeout),
|
||||||
|
reset_uid: true
|
||||||
|
|
||||||
command! "git",
|
command! "git",
|
||||||
args: ["config", "homebrew.cacheversion", cache_version],
|
args: ["config", "homebrew.cacheversion", cache_version],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user