From 4eb2cc9693fd7cdd5c1933f27b2461d274d8ce32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vedran=20Veki=C4=87?= Date: Fri, 21 Oct 2016 09:13:37 +0200 Subject: [PATCH] Add Rebase option to Pull --- repo.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repo.go b/repo.go index bfc2cbe7c898..3d6c138c7925 100644 --- a/repo.go +++ b/repo.go @@ -121,6 +121,7 @@ func Clone(from, to string, opts CloneRepoOptions) (err error) { type PullRemoteOptions struct { Timeout time.Duration All bool + Rebase bool Remote string Branch string } @@ -128,6 +129,9 @@ type PullRemoteOptions struct { // Pull pulls changes from remotes. func Pull(repoPath string, opts PullRemoteOptions) error { cmd := NewCommand("pull") + if opts.Rebase { + cmd.AddArguments("--rebase") + } if opts.All { cmd.AddArguments("--all") } else {