mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-10-26 13:55:28 +03:00
Remove deprecated --redirect-stdout in git branch cleanup (#827)
This commit is contained in:
parent
5782e2b5d2
commit
76ab5b09b3
@ -56,7 +56,7 @@ export def "git branch-cleanup" [
|
||||
|
||||
# The current branch name
|
||||
def current_branch [] {
|
||||
run-external --redirect-stdout "git" "branch" "--show-current"
|
||||
run-external "git" "branch" "--show-current"
|
||||
| into string
|
||||
| str trim
|
||||
}
|
||||
@ -85,14 +85,14 @@ def get_default_branch [
|
||||
$upstream
|
||||
]
|
||||
|
||||
run-external --redirect-stdout "git" "symbolic-ref" ...$args
|
||||
run-external "git" "symbolic-ref" ...$args
|
||||
| str trim
|
||||
| path basename
|
||||
}
|
||||
|
||||
# Get the local set of branches to always keep
|
||||
def get_keep [] {
|
||||
let keep = run-external --redirect-stdout "git" "config" "--local" "--get" "branch-cleanup.keep"
|
||||
let keep = run-external "git" "config" "--local" "--get" "branch-cleanup.keep"
|
||||
|
||||
if ( $keep | is-empty ) {
|
||||
return []
|
||||
@ -139,7 +139,7 @@ def list_merged [
|
||||
]
|
||||
)
|
||||
|
||||
run-external --redirect-stdout "git" "branch" ...$args
|
||||
run-external "git" "branch" ...$args
|
||||
| lines
|
||||
| filter {|branch|
|
||||
$keep
|
||||
@ -150,7 +150,7 @@ def list_merged [
|
||||
}
|
||||
|
||||
def remotes [] {
|
||||
run-external --redirect-stdout "git" "remote" "-v"
|
||||
run-external "git" "remote" "-v"
|
||||
| parse "{value}\t{description} ({operation})"
|
||||
| select value description
|
||||
| uniq
|
||||
|
Loading…
Reference in New Issue
Block a user