Files
Scoop/lib/git.ps1
T
Jakub Čábera 56d54d1c91 feature: Prepare extraction of main bucket (#3060)
- Add preparing changes for extracting the main bucket to https://github.com/scoopinstaller/scoop-main
- Download main bucket on installation
- Add check_main_bucket function
- Add main bucket to buckets.json
- Add docker-compose.yml with default debugging image
- Remove old TODOs
- Refactor bucketdir -> Find-BucketDirectory
- Remove redundant .vscode settings
2019-04-24 21:08:53 +02:00

49 lines
830 B
PowerShell

function git_proxy_cmd {
$proxy = $(scoop config proxy)
$cmd = "git $($args | ForEach-Object { "$_ " })"
if($proxy -and $proxy -ne 'none') {
$cmd = "SET HTTPS_PROXY=$proxy&&SET HTTP_PROXY=$proxy&&$cmd"
}
& "$env:COMSPEC" /c $cmd
}
function git_clone {
git_proxy_cmd clone $args
}
function git_ls_remote {
git_proxy_cmd ls-remote $args
}
function git_checkout {
git_proxy_cmd checkout $args
}
function git_branch {
git_proxy_cmd branch $args
}
function git_pull {
git_proxy_cmd pull $args
}
function git_fetch {
git_proxy_cmd fetch $args
}
function git_log {
git_proxy_cmd --no-pager log $args
}
function git_checkout {
git_proxy_cmd checkout $args
}
function git_branch {
git_proxy_cmd branch $args
}
function git_config {
git_proxy_cmd config $args
}