fix branch recognition
This commit is contained in:
parent
e8c4946111
commit
0675918362
@ -6,7 +6,7 @@
|
||||
while true; do
|
||||
echo "Checking for new commits on any branch ..."
|
||||
git fetch origin
|
||||
branch_with_new_commits=`git fetch origin >/dev/null; git for-each-ref --format='%(refname:short) %(upstream:track)' refs/heads | grep '\[behind' | cut -d'[' -f1 | head -n1`
|
||||
branch_with_new_commits=`git fetch origin >/dev/null; git for-each-ref --format='%(refname:short) %(upstream:track)' refs/heads | grep '\[behind' | cut -d' ' -f1 | head -n1`
|
||||
|
||||
if [ -n "$branch_with_new_commits" ]; then
|
||||
echo "checking out branch: $branch_with_new_commits"
|
||||
|
Loading…
Reference in New Issue
Block a user