aboutsummaryrefslogtreecommitdiffstats
path: root/worktree.go
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-09-04 13:56:16 +0100
committerGitHub <noreply@github.com>2023-09-04 13:56:16 +0100
commit0377d0627fa4e32a576634f441e72153807e395a (patch)
tree2b8dfeb9a5a75d9bd290c851dccb6cc2506e7b01 /worktree.go
parentcd3a21c619126288123c32f4a714181f9e1a68f8 (diff)
parent753b0d5cef6d8ef27c35de884b3c1673a33d1916 (diff)
downloadgo-git-0377d0627fa4e32a576634f441e72153807e395a.tar.gz
Merge pull request #821 from daolis/bug/resetfix
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
}