diff options
-rw-r--r-- | src/fedpkg.bash | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fedpkg.bash b/src/fedpkg.bash index d986465..45d6c21 100644 --- a/src/fedpkg.bash +++ b/src/fedpkg.bash @@ -241,11 +241,12 @@ _fedpkg_arch() have _fedpkg && _fedpkg_branch() { - local git_options= + local git_options= format="--format %(refname:short)" [[ -n $1 ]] && git_options="--git-dir=$1/.git" - git $git_options branch -l 2>/dev/null | sed 's/^\W*//' - git $git_options branch -rl 2>/dev/null | grep -v origin/HEAD | sed 's/^\W*//' | cut -d/ -f2 + git $git_options for-each-ref $format 'refs/remotes/origin/*/master' \ + | sed 's,origin/\(.*\)/master,\1,' + git $git_options for-each-ref $format 'refs/heads' } have _fedpkg && |