aboutsummaryrefslogtreecommitdiffstats
path: root/worktree.go
diff options
context:
space:
mode:
authorStephan <stephan.bechter@gmail.com>2023-07-28 11:08:55 +0200
committerStephan <stephan.bechter@gmail.com>2023-09-04 08:13:33 +0200
commit753b0d5cef6d8ef27c35de884b3c1673a33d1916 (patch)
tree2b8dfeb9a5a75d9bd290c851dccb6cc2506e7b01 /worktree.go
parentcd3a21c619126288123c32f4a714181f9e1a68f8 (diff)
downloadgo-git-753b0d5cef6d8ef27c35de884b3c1673a33d1916.tar.gz
git: worktree, reset ignored files that are part of the worktree: Fixes #819
Diffstat (limited to 'worktree.go')
-rw-r--r--worktree.go4
1 files changed, 2 insertions, 2 deletions
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
}