@matheusbsbs / matheus-bagliano / commits / 9cc2527cd2
Fork 0

branch: make it operable from a subdirectory.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Nov 27, 2005 at 23:16 UTC 9cc2527cd2943c82cf448dccec564869b0a762e6
1 file changed +2 -4
git-branch.sh
+2 -4
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -. git-sh-setup
3 +GIT_DIR=`git-rev-parse --git-dir` || exit $?
4
5 usage () {
6 echo >&2 "usage: $(basename $0)"' [-d <branch>] | [[-f] <branch> [start-point]]
@@ -12,8 +12,7 @@ If two arguments, create a new branch <branchname> based off of <start-point>.
12 exit 1
13 }
14
15 -headref=$(GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD |
16 - sed -e 's|^refs/heads/||')
15 +headref=$(git-symbolic-ref HEAD | sed -e 's|^refs/heads/||')
16
17 delete_branch () {
18 option="$1"
@@ -114,4 +113,3 @@ then
113 fi
114 fi
115 git update-ref "refs/heads/$branchname" $rev
117 -