summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/src-d/go-git.v4/worktree.go
diff options
context:
space:
mode:
authortechknowlogick <matti@mdranta.net>2019-06-18 22:14:15 -0400
committerLunny Xiao <xiaolunwen@gmail.com>2019-06-19 10:14:15 +0800
commit33ad5548002156f7fb7779870571600c0a181c85 (patch)
tree9d4269a2ea00fec152f462ffddffbeffba64ba2f /vendor/gopkg.in/src-d/go-git.v4/worktree.go
parentb209531959104cb6d5a8079ec567386720f3aaf3 (diff)
downloadgitea-33ad5548002156f7fb7779870571600c0a181c85.tar.gz
gitea-33ad5548002156f7fb7779870571600c0a181c85.zip
update go-git to v4.12.0 - fixes #7248 (#7249)
Diffstat (limited to 'vendor/gopkg.in/src-d/go-git.v4/worktree.go')
-rw-r--r--vendor/gopkg.in/src-d/go-git.v4/worktree.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/gopkg.in/src-d/go-git.v4/worktree.go b/vendor/gopkg.in/src-d/go-git.v4/worktree.go
index dae40a38a7..576ae0abde 100644
--- a/vendor/gopkg.in/src-d/go-git.v4/worktree.go
+++ b/vendor/gopkg.in/src-d/go-git.v4/worktree.go
@@ -160,6 +160,8 @@ func (w *Worktree) Checkout(opts *CheckoutOptions) error {
ro := &ResetOptions{Commit: c, Mode: MergeReset}
if opts.Force {
ro.Mode = HardReset
+ } else if opts.Keep {
+ ro.Mode = SoftReset
}
if !opts.Hash.IsZero() && !opts.Create {
@@ -720,7 +722,7 @@ func (w *Worktree) Clean(opts *CleanOptions) error {
func (w *Worktree) doClean(status Status, opts *CleanOptions, dir string, files []os.FileInfo) error {
for _, fi := range files {
- if fi.Name() == ".git" {
+ if fi.Name() == GitDirName {
continue
}