From 76ab5b09b3dcd0968109d07c60c346cdc4ceaadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Kalm=C3=A1r?= Date: Mon, 29 Apr 2024 13:22:31 +0200 Subject: [PATCH] Remove deprecated --redirect-stdout in git branch cleanup (#827) --- modules/git/git_branch_cleanup.nu | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/git/git_branch_cleanup.nu b/modules/git/git_branch_cleanup.nu index 0cb78226..8f0ebfd6 100644 --- a/modules/git/git_branch_cleanup.nu +++ b/modules/git/git_branch_cleanup.nu @@ -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