X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-branch.sh;h=134e68cf7f0389d73af000c4303c4dda27f89d57;hb=56d1398ad305498faf57d6e433f97ad393d7909e;hp=663a3a370c8889e2ba78d627811c652d41e7971b;hpb=6aba8fa86562c888719ccf3baf292e0151e53b20;p=git.git diff --git a/git-branch.sh b/git-branch.sh index 663a3a37..134e68cf 100755 --- a/git-branch.sh +++ b/git-branch.sh @@ -1,6 +1,6 @@ #!/bin/sh -USAGE='[(-d | -D) ] | [[-f] []]' +USAGE='[(-d | -D) ] | [[-f] []] | -r' LONG_USAGE='If no arguments, show available branches and mark current branch with a star. If one argument, create a new branch based off of current HEAD. If two arguments, create a new branch based off of .' @@ -82,8 +82,7 @@ done case "$#" in 0) - git-rev-parse --symbolic --all | - sed -ne 's|^refs/heads/||p' | + git-rev-parse --symbolic --branches | sort | while read ref do