diff options
Diffstat (limited to 'worktree.go')
-rw-r--r-- | worktree.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/worktree.go b/worktree.go index 4e4d544..60c8adb 100644 --- a/worktree.go +++ b/worktree.go @@ -112,22 +112,22 @@ func (w *Worktree) PullContext(ctx context.Context, o *PullOptions) error { } if o.RecurseSubmodules != NoRecurseSubmodules { - return w.updateSubmodules(o.RecurseSubmodules) + return w.updateSubmodules(&SubmoduleUpdateOptions{ + RecurseSubmodules: o.RecurseSubmodules, + Auth: o.Auth, + }) } return nil } -func (w *Worktree) updateSubmodules(recursion SubmoduleRescursivity) error { +func (w *Worktree) updateSubmodules(o *SubmoduleUpdateOptions) error { s, err := w.Submodules() if err != nil { return err } - - return s.Update(&SubmoduleUpdateOptions{ - Init: true, - RecurseSubmodules: recursion, - }) + o.Init = true + return s.Update(o) } // Checkout switch branches or restore working tree files. |