Skip to content

Commit

Permalink
Merge pull request #2 from vvekic/master
Browse files Browse the repository at this point in the history
Add Rebase option to Pull
  • Loading branch information
tboerger committed Nov 7, 2016
2 parents a9d4aeb + 4eb2cc9 commit 93f55fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,17 @@ func Clone(from, to string, opts CloneRepoOptions) (err error) {
type PullRemoteOptions struct {
Timeout time.Duration
All bool
Rebase bool
Remote string
Branch string
}

// 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 {
Expand Down

0 comments on commit 93f55fc

Please sign in to comment.