diff options
author | Paulo Gomes <pjbgf@linux.com> | 2023-05-03 21:54:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 21:54:32 +0100 |
commit | da73c5f950fb399611e3eb608f6ee99f23eb53b5 (patch) | |
tree | 9448e13e7a711172b3623d72259f0a353afeee68 /worktree_status.go | |
parent | 4c53decce0448efa6da0cfc4939693cb4e378648 (diff) | |
parent | cf51e2febf37332f11ae63feca768d9672e10a36 (diff) | |
download | go-git-da73c5f950fb399611e3eb608f6ee99f23eb53b5.tar.gz |
Merge pull request #719 from cbbm142/master
git: worktree, add check to see if file already checked in. Fixes #718
Diffstat (limited to 'worktree_status.go')
-rw-r--r-- | worktree_status.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/worktree_status.go b/worktree_status.go index f3091cf..a26c9e5 100644 --- a/worktree_status.go +++ b/worktree_status.go @@ -169,7 +169,9 @@ func (w *Worktree) excludeIgnoredChanges(changes merkletrie.Changes) merkletrie. if len(path) != 0 { isDir := (len(ch.To) > 0 && ch.To.IsDir()) || (len(ch.From) > 0 && ch.From.IsDir()) if m.Match(path, isDir) { - continue + if len(ch.From) == 0 { + continue + } } } res = append(res, ch) |