From 2843f7424e5fcff6988b5273c6a788538288b524 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 7 Aug 2017 14:24:10 +0300 Subject: repo_branches: an alias now --- %HOME%/.bash_utils/git.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '%HOME%/.bash_utils') diff --git a/%HOME%/.bash_utils/git.sh b/%HOME%/.bash_utils/git.sh index ce0a4ef..afb9831 100644 --- a/%HOME%/.bash_utils/git.sh +++ b/%HOME%/.bash_utils/git.sh @@ -10,13 +10,13 @@ source "$HOME/.bash_utils/text.sh" alias branch_files='git ls-tree -r --name-only HEAD' alias branch_dirs='git ls-tree -r --name-only HEAD -d' -repo_branches() { - git for-each-ref --format='%(refname:short)' refs/heads/ -} +alias repo_branches='git for-each-ref '"'"'--format=%(refname:short)'"'"' refs/heads/' workdir_is_clean() ( set -o errexit -o nounset -o pipefail - test -z "$( git status --porcelain )" + local status + status="$( git status --porcelain )" + test -z "$status" ) alias workdir_clean_all='git clean -fdx' -- cgit v1.2.3