X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-branch.sh;h=134e68cf7f0389d73af000c4303c4dda27f89d57;hb=fbd01abf50488d8ed94c36bdd5bfc2a4ddafb8a2;hp=663a3a370c8889e2ba78d627811c652d41e7971b;hpb=b4a081b428c607f98c5d0a0eec8d543dc1f2abcd;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