aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
authorMichael Rykov <mrykov@gmail.com>2018-01-15 12:32:53 -0800
committerMichael Rykov <mrykov@gmail.com>2018-01-17 16:43:15 +0700
commit591aed138177b27b08a90c90e6e074a6cf2dbd00 (patch)
treecc94d2d3accb4f5277f2a13e571da275b0bbf08e /repository.go
parente9247ce9c5ce12126f646ca3ddf0066e4829bd14 (diff)
downloadgo-git-591aed138177b27b08a90c90e6e074a6cf2dbd00.tar.gz
Support for clone without checkout
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/repository.go b/repository.go
index 8a966c6..24d025d 100644
--- a/repository.go
+++ b/repository.go
@@ -449,7 +449,7 @@ func (r *Repository) clone(ctx context.Context, o *CloneOptions) error {
return err
}
- if r.wt != nil {
+ if r.wt != nil && !o.NoCheckout {
w, err := r.Worktree()
if err != nil {
return err