Skip to content

Commit 93f55fc

Browse files
authored
Merge pull request #2 from vvekic/master
Add Rebase option to Pull
2 parents a9d4aeb + 4eb2cc9 commit 93f55fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

repo.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,17 @@ func Clone(from, to string, opts CloneRepoOptions) (err error) {
121121
type PullRemoteOptions struct {
122122
Timeout time.Duration
123123
All bool
124+
Rebase bool
124125
Remote string
125126
Branch string
126127
}
127128

128129
// Pull pulls changes from remotes.
129130
func Pull(repoPath string, opts PullRemoteOptions) error {
130131
cmd := NewCommand("pull")
132+
if opts.Rebase {
133+
cmd.AddArguments("--rebase")
134+
}
131135
if opts.All {
132136
cmd.AddArguments("--all")
133137
} else {

0 commit comments

Comments
 (0)