Skip to content

Commit f66f7e4

Browse files
author
equt
committed
[ fix #891 ] Cast branch output if HEAD not exists
1 parent ad8c77b commit f66f7e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/git-browse

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
if [[ $1 == "" ]]
44
then
5-
branch=$(git rev-parse --abbrev-ref HEAD)
5+
branch=$(git rev-parse --abbrev-ref HEAD 2&> /dev/null)
66
remote=$(git config branch."${branch}".remote || echo "origin")
77
else
88
remote=$1

0 commit comments

Comments
 (0)