|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/sh |
|
|
|
#!/bin/sh |
|
|
|
|
|
|
|
|
|
|
|
. git-sh-setup |
|
|
|
GIT_DIR=`git-rev-parse --git-dir` || exit $? |
|
|
|
|
|
|
|
|
|
|
|
usage () { |
|
|
|
usage () { |
|
|
|
echo >&2 "usage: $(basename $0)"' [-d <branch>] | [[-f] <branch> [start-point]] |
|
|
|
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>. |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
headref=$(GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD | |
|
|
|
headref=$(git-symbolic-ref HEAD | sed -e 's|^refs/heads/||') |
|
|
|
sed -e 's|^refs/heads/||') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
delete_branch () { |
|
|
|
delete_branch () { |
|
|
|
option="$1" |
|
|
|
option="$1" |
|
|
@ -114,4 +113,3 @@ then |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
git update-ref "refs/heads/$branchname" $rev |
|
|
|
git update-ref "refs/heads/$branchname" $rev |
|
|
|
|
|
|
|
|
|
|
|