diff --git a/pkg/zeta/worktree_windows.go b/pkg/zeta/worktree_windows.go index cf5fb66..9b2aae4 100644 --- a/pkg/zeta/worktree_windows.go +++ b/pkg/zeta/worktree_windows.go @@ -54,9 +54,6 @@ type hasher interface { } func (w *Worktree) hijackChangeFileMode(ch *merkletrie.Change) bool { - if ch.From == nil || ch.To == nil { - return false - } from := ch.From.Last() to := ch.To.Last() a, ok := from.(hasher) @@ -114,9 +111,6 @@ func (w *Worktree) excludeIgnoredChanges(changes merkletrie.Changes) merkletrie. } } } - if w.hijackChangeFileMode(&ch) { - continue - } // Add if ch.From == nil { newItems = append(newItems, ch) @@ -127,6 +121,10 @@ func (w *Worktree) excludeIgnoredChanges(changes merkletrie.Changes) merkletrie. rmItems[strings.ToLower(ch.From.String())] = ch continue } + // modified + if w.hijackChangeFileMode(&ch) { + continue + } res = append(res, ch) } for _, ch := range newItems {