@matheusbsbs / matheus-bagliano / commits / ee1a9b2f18
Fork 0

Use Linus' show ref in "git-branch.sh".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Christian Couder committed Sep 17, 2006 at 06:32 UTC ee1a9b2f1824100bbac8d23e7dea1a6e9e85fb21
1 file changed +2 -2
git-branch.sh
+2 -2
@@ -21,7 +21,7 @@ delete_branch () {
21 ,,)
22 die "What branch are you on anyway?" ;;
23 esac
24 - branch=$(cat "$GIT_DIR/refs/heads/$branch_name") &&
24 + branch=$(git-show-ref --verify --hash -- "refs/heads/$branch_name") &&
25 branch=$(git-rev-parse --verify "$branch^0") ||
26 die "Seriously, what branch are you talking about?"
27 case "$option" in
@@ -112,7 +112,7 @@ rev=$(git-rev-parse --verify "$head") || exit
112 git-check-ref-format "heads/$branchname" ||
113 die "we do not like '$branchname' as a branch name."
114
115 -if [ -e "$GIT_DIR/refs/heads/$branchname" ]
115 +if git-show-ref --verify --quiet -- "refs/heads/$branchname"
116 then
117 if test '' = "$force"
118 then