diff options
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git.go | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index a982f032b..7b2c2f2fa 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -419,22 +419,9 @@ func (c *GitCommand) IsInMergeState() (bool, error) { return strings.Contains(output, "conclude merge") || strings.Contains(output, "unmerged paths"), nil } -// RebaseMode returns "" for non-rebase mode, "normal" for normal rebase -// and "interactive" for interactive rebase -func (c *GitCommand) RebaseMode() (string, error) { - exists, err := c.OSCommand.FileExists(".git/rebase-apply") - if err != nil { - return "", err - } - if exists { - return "normal", nil - } - exists, err = c.OSCommand.FileExists(".git/rebase-merge") - if exists { - return "interactive", err - } else { - return "", err - } +// IsInRebasingState tells us if we are rebasing +func (c *GitCommand) IsInRebasingState() (bool, error) { + return c.OSCommand.FileExists(".git/rebase-merge") } // RemoveFile directly |