aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-09-01 17:26:52 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-09-01 17:26:52 +0200
commitf1e58e0d30095cf768ff04d379b5e4145a874be8 (patch)
tree1922e3a721c4c19889557f96108076c325b95fbd /repository.go
parent3ca370277427c5d508f0dedacbd559523a305121 (diff)
downloadgo-git-f1e58e0d30095cf768ff04d379b5e4145a874be8.tar.gz
Worktree.Reset ignore untracked files on Merge mode
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go5
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
}