Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Use Linus' show ref in "git-branch.sh".
author
Christian Couder
<chriscool@tuxfamily.org>
Sun, 17 Sep 2006 04:32:24 +0000
(06:32 +0200)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 17 Sep 2006 09:43:08 +0000
(
02:43
-0700)
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-branch.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c40abef
)
diff --git
a/git-branch.sh
b/git-branch.sh
index e0501ec23f5c40134af0e6211cf1ba28e69e1d5b..2600e9c4a81a0d3aa0d23bde23b6b0b34256b4d2 100755
(executable)
--- a/
git-branch.sh
+++ b/
git-branch.sh
@@
-21,7
+21,7
@@
delete_branch () {
,,)
die "What branch are you on anyway?" ;;
esac
,,)
die "What branch are you on anyway?" ;;
esac
- branch=$(
cat "$GIT_DIR/
refs/heads/$branch_name") &&
+ branch=$(
git-show-ref --verify --hash -- "
refs/heads/$branch_name") &&
branch=$(git-rev-parse --verify "$branch^0") ||
die "Seriously, what branch are you talking about?"
case "$option" in
branch=$(git-rev-parse --verify "$branch^0") ||
die "Seriously, what branch are you talking about?"
case "$option" in
@@
-112,7
+112,7
@@
rev=$(git-rev-parse --verify "$head") || exit
git-check-ref-format "heads/$branchname" ||
die "we do not like '$branchname' as a branch name."
git-check-ref-format "heads/$branchname" ||
die "we do not like '$branchname' as a branch name."
-if
[ -e "$GIT_DIR/refs/heads/$branchname" ]
+if
git-show-ref --verify --quiet -- "refs/heads/$branchname"
then
if test '' = "$force"
then
then
if test '' = "$force"
then