fix regression in support for detached HEAD state
for gh pr status
This commit is contained in:
parent
28f91cbed8
commit
3bb6983b35
4 changed files with 12 additions and 6 deletions
|
|
@ -207,7 +207,11 @@ func (c *fsContext) Branch() (string, error) {
|
|||
}
|
||||
|
||||
currentBranch, err := git.CurrentBranch()
|
||||
if err != nil {
|
||||
switch err {
|
||||
case nil:
|
||||
case git.ErrNotOnAnyBranch:
|
||||
return "", err
|
||||
default:
|
||||
return "", fmt.Errorf("could not determine current branch: %w", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue