X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-branch.sh;h=134e68cf7f0389d73af000c4303c4dda27f89d57;hb=698ce6f87e0d6db380f7306e190e8586da184577;hp=663a3a370c8889e2ba78d627811c652d41e7971b;hpb=12d81ce59846e17676c5534257ca2f1783829d63;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