mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-05-04 16:50:37 +00:00
29 lines
481 B
PowerShell
29 lines
481 B
PowerShell
function git_proxy_cmd {
|
|
$proxy = $(scoop config proxy)
|
|
$cmd = "git $($args |% { "$_ " })"
|
|
if($proxy) {
|
|
$cmd = "SET HTTPS_PROXY=$proxy&&SET HTTP_PROXY=$proxy&&$cmd"
|
|
}
|
|
cmd /c $cmd
|
|
}
|
|
|
|
function git_clone {
|
|
git_proxy_cmd clone $args
|
|
}
|
|
|
|
function git_ls_remote {
|
|
git_proxy_cmd ls-remote $args
|
|
}
|
|
|
|
function git_pull {
|
|
git_proxy_cmd pull $args
|
|
}
|
|
|
|
function git_fetch {
|
|
git_proxy_cmd fetch $args
|
|
}
|
|
|
|
function git_log {
|
|
git_proxy_cmd log $args
|
|
}
|