Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-15 04:30:03 +0300
committerJunio C Hamano <junkio@cox.net>2005-12-15 04:30:03 +0300
commit1ed91937e5cd59fdbdfa5f15f6fac132d2b21ce0 (patch)
treef65b929c006c31043213152752ea0c80bf08b9e5 /git-branch.sh
parenta9572072f0ab0ac97e64b0dc01254a3ad95befe1 (diff)
parent294c695d8cfbcf95a5c33fc6ba386f496964defb (diff)
GIT 0.99.9n aka 1.0rc6v1.0rc6v0.99.9n
Oh, I hate to do this but I ended up merging big usage string cleanups from Fredrik, git-am enhancements that made a lot of sense for non mbox users from HPA, and rebase changes (done independently by me and Lukas) among other things, so git is still in perpetual state of 1.0rc. 1.0 will probably be next Wednesday, but who knows. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-branch.sh')
-rwxr-xr-xgit-branch.sh21
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/||')