diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-09-01 17:26:52 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-09-01 17:26:52 +0200 |
commit | f1e58e0d30095cf768ff04d379b5e4145a874be8 (patch) | |
tree | 1922e3a721c4c19889557f96108076c325b95fbd /repository.go | |
parent | 3ca370277427c5d508f0dedacbd559523a305121 (diff) | |
download | go-git-f1e58e0d30095cf768ff04d379b5e4145a874be8.tar.gz |
Worktree.Reset ignore untracked files on Merge mode
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/repository.go b/repository.go index 932b8d4..fbc7871 100644 --- a/repository.go +++ b/repository.go @@ -456,7 +456,10 @@ func (r *Repository) clone(ctx context.Context, o *CloneOptions) error { return err } - if err := w.Reset(&ResetOptions{Commit: head.Hash()}); err != nil { + if err := w.Reset(&ResetOptions{ + Mode: MergeReset, + Commit: head.Hash(), + }); err != nil { return err } |