diff options
author | 2005-12-14 13:01:01 -0800 | |
---|---|---|
committer | 2005-12-14 13:01:01 -0800 | |
commit | b0d3e9baaa16c805ef941e8f26d55fb23f091ef5 (patch) | |
tree | 142e8fb76c906de7b61b9bf55ab026bee2388aa3 /git-branch.sh | |
parent | Documentation: topic branches (diff) | |
parent | applypatch: no need to do non-portable [[ ... ]] (diff) | |
download | tgif-b0d3e9baaa16c805ef941e8f26d55fb23f091ef5.tar.xz |
Merge branch 'fk/usage'
Diffstat (limited to 'git-branch.sh')
-rwxr-xr-x | git-branch.sh | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/git-branch.sh b/git-branch.sh index 5306b2719f..0266f46223 100755 --- a/git-branch.sh +++ b/git-branch.sh @@ -1,21 +1,12 @@ #!/bin/sh -GIT_DIR=`git-rev-parse --git-dir` || exit $? - -die () { - echo >&2 "$*" - exit 1 -} - -usage () { - echo >&2 "usage: $(basename $0)"' [-d <branch>] | [[-f] <branch> [start-point]] - -If no arguments, show available branches and mark current branch with a star. +USAGE='[-d <branch>] | [[-f] <branch> [start-point]]' +LONG_USAGE='If no arguments, show available branches and mark current branch with a star. If one argument, create a new branch <branchname> based off of current HEAD. -If two arguments, create a new branch <branchname> based off of <start-point>. -' - exit 1 -} +If two arguments, create a new branch <branchname> based off of <start-point>.' + +SUBDIRECTORY_OK='Yes' +. git-sh-setup headref=$(git-symbolic-ref HEAD | sed -e 's|^refs/heads/||') |