aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-09-01 17:27:54 +0200
committerGitHub <noreply@github.com>2017-09-01 17:27:54 +0200
commit8ce9f5f240730ce21f50e42409d17fac7d71e051 (patch)
tree1922e3a721c4c19889557f96108076c325b95fbd /repository.go
parent3ca370277427c5d508f0dedacbd559523a305121 (diff)
parentf1e58e0d30095cf768ff04d379b5e4145a874be8 (diff)
downloadgo-git-8ce9f5f240730ce21f50e42409d17fac7d71e051.tar.gz
Merge pull request #572 from mcuadros/reset
Worktree.Reset refactor and Soft, Merge, Hard and Mixed modes
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
}