Commit 0a56f199 authored by Vitaly Lipatov's avatar Vitaly Lipatov

git: fix branch list (include current branch too)

parent 6ee2e0d0
......@@ -4,9 +4,10 @@
# Author: Denis Smirnov <mithraen@altlinux.ru>
# Public domain
get_branch_list()
{
git branch | grep '^ ' | sed 's/^..\(.*\)/\1/'
git branch | grep '^[* ] ' | sed 's/^[* ] \(.*\)/\1/'
}
get_remote_repo_list()
......@@ -17,7 +18,7 @@ get_remote_repo_list()
is_exist_branch()
{
test -n "$1" || return 1
get_branch_list | grep -q $1
get_branch_list | grep -q "^$1\$"
}
is_exist_remote_repo()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment