From 6211b64059b31a0001fa5ad9fb6fdc749c793fea Mon Sep 17 00:00:00 2001 From: suchAdemon Date: Wed, 29 Aug 2018 13:54:51 +0200 Subject: [PATCH] git_update_all_branches.sh: only update branches which are checked out already --- git_update_all_branches.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git_update_all_branches.sh b/git_update_all_branches.sh index d292bb7..e12acb1 100755 --- a/git_update_all_branches.sh +++ b/git_update_all_branches.sh @@ -34,7 +34,7 @@ then fi fi -branchges=$(${BINgit} -C "${gitreppath}" br -a | grep remotes | grep -v "remotes/origin/HEAD" | wc -l) +branchges=$(${BINgit} -C "${gitreppath}" br -a | grep -v remotes | grep -v "remotes/origin/HEAD" | wc -l) activebranch="$(${BINgit} -C "${gitreppath}" branch | grep "\*" | awk '{print $2}')" HIDECURSOR @@ -47,7 +47,7 @@ echo -e " x x" echo -e " mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj" WRITE -for f in $(${BINgit} -C "${gitreppath}" br -a | grep remotes | grep -v "remotes/origin/HEAD" | awk '{print $1}' | cut -f3 -d\/) +for f in $(${BINgit} -C "${gitreppath}" br -a | grep -v remotes | awk '{print $1}') do #echo "Updateing[${branchcounter}/${branchges}]: ${f}" showBar ${branchcounter} ${branchges} ${f} "[$((${branchcounter} + 1))/${branchges}]" #Call bar drawing function "showBar"