Skip to content

Commit 68e6a15

Browse files
authored
Merge pull request #892 from equt/#891
[ fix #891 ] Cast branch output if HEAD not exists
2 parents 05ce91f + f66f7e4 commit 68e6a15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/git-browse

Lines changed: 1 addition & 1 deletion
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)