summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-11-13 21:16:24 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-11-13 21:36:16 +1100
commitf43ba728e3206b354d8cb66470fa2a42300c01a8 (patch)
treeca07ae1218481cead322d027e30b1f7d5c29a478 /pkg/commands
parentb6623625700e1267f6543fa43a9f0322723ca1e5 (diff)
prompt to set upstream when pulling on untracked branch
prompt to set upstream when pulling on untracked branch
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 16b09faa7..145b188fe 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -1052,3 +1052,7 @@ func (c *GitCommand) BeginInteractiveRebaseForCommit(commits []*Commit, commitIn
return nil
}
+
+func (c *GitCommand) SetUpstreamBranch(upstream string) error {
+ return c.OSCommand.RunCommand(fmt.Sprintf("git branch -u %s", upstream))
+}