summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fedpkg.bash7
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 &&