From 753b0d5cef6d8ef27c35de884b3c1673a33d1916 Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 28 Jul 2023 11:08:55 +0200 Subject: git: worktree, reset ignored files that are part of the worktree: Fixes #819 --- worktree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'worktree.go') diff --git a/worktree.go b/worktree.go index 595dcea..f9c01af 100644 --- a/worktree.go +++ b/worktree.go @@ -368,7 +368,7 @@ func (w *Worktree) resetIndex(t *object.Tree, dirs []string) error { } func (w *Worktree) resetWorktree(t *object.Tree) error { - changes, err := w.diffStagingWithWorktree(true) + changes, err := w.diffStagingWithWorktree(true, false) if err != nil { return err } @@ -420,7 +420,7 @@ func (w *Worktree) checkoutChange(ch merkletrie.Change, t *object.Tree, idx *ind } func (w *Worktree) containsUnstagedChanges() (bool, error) { - ch, err := w.diffStagingWithWorktree(false) + ch, err := w.diffStagingWithWorktree(false, true) if err != nil { return false, err } -- cgit