Skip to content

Commit

Permalink
fixup! amend! Add BranchBeingRebased to Model struct
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaller committed Jul 24, 2023
1 parent 9a2e9b9 commit 182b5a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/gui/controllers/helpers/refresh_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ func (self *RefreshHelper) determineCheckoutBranchName() string {
return strings.TrimPrefix(rebasedBranch, "refs/heads/")
}

if bisectedBranch := self.c.Git().Bisect.GetInfo().GetStartSha(); bisectedBranch != "" {
if bisectInfo := self.c.Git().Bisect.GetInfo(); bisectInfo.Bisecting() && bisectInfo.GetStartSha() != "" {
// Likewise, when we're bisecting we're on a detached head as well. In
// this case we read the branch name from the ".git/BISECT_START" file.
return bisectedBranch
return bisectInfo.GetStartSha()
}

// In all other cases, get the branch name by asking git what branch is
Expand Down

0 comments on commit 182b5a8

Please sign in to comment.