Skip to content

Commit

Permalink
Merge pull request #892 from equt/#891
Browse files Browse the repository at this point in the history
[ fix #891 ] Cast branch output if HEAD not exists
  • Loading branch information
spacewander authored Nov 14, 2020
2 parents 05ce91f + f66f7e4 commit 68e6a15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/git-browse
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [[ $1 == "" ]]
then
branch=$(git rev-parse --abbrev-ref HEAD)
branch=$(git rev-parse --abbrev-ref HEAD 2&> /dev/null)
remote=$(git config branch."${branch}".remote || echo "origin")
else
remote=$1
Expand Down

0 comments on commit 68e6a15

Please sign in to comment.