summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r--pkg/commands/git.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index f2a4706cc..19fe9c219 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -1192,3 +1192,15 @@ func (c *GitCommand) colorArg() string {
func (c *GitCommand) RenameBranch(oldName string, newName string) error {
return c.OSCommand.RunCommand("git branch --move %s %s", oldName, newName)
}
+
+func (c *GitCommand) WorkingTreeState() string {
+ rebaseMode, _ := c.RebaseMode()
+ if rebaseMode != "" {
+ return "rebasing"
+ }
+ merging, _ := c.IsInMergeState()
+ if merging {
+ return "merging"
+ }
+ return "normal"
+}