mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Fix "HEAD is not a symbolic ref" error when HEAD is a tag.
This commit is contained in:
parent
f3ec01dd10
commit
12b829e0bf
@ -78,7 +78,7 @@ function __bobthefish_escape_regex -a str -d 'A backwards-compatible `string esc
|
||||
end
|
||||
|
||||
function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish)'
|
||||
set -l branch (command git symbolic-ref HEAD | string replace -r '^refs/heads/' '' 2>/dev/null)
|
||||
set -l branch (command git symbolic-ref HEAD 2>/dev/null | string replace -r '^refs/heads/' '')
|
||||
and begin
|
||||
[ -n "$theme_git_default_branches" ]
|
||||
or set -l theme_git_default_branches master main
|
||||
|
Loading…
Reference in New Issue
Block a user