summaryrefslogtreecommitdiffstats
path: root/pkg/gui/commit_files_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-03-31 22:46:42 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-04-02 11:00:15 +1100
commit7364525bf5ae7b6b4ff8f0e4381e1014726219ad (patch)
tree1014f1c8e1dcd6aace604db674ac816a1252cae8 /pkg/gui/commit_files_panel.go
parent54910fdb76f8a699d2cfb96459b75b60485fd3f7 (diff)
do not show commit files of another parent as added to the patch
Diffstat (limited to 'pkg/gui/commit_files_panel.go')
-rw-r--r--pkg/gui/commit_files_panel.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/gui/commit_files_panel.go b/pkg/gui/commit_files_panel.go
index 6a7baad2f..511d31b3d 100644
--- a/pkg/gui/commit_files_panel.go
+++ b/pkg/gui/commit_files_panel.go
@@ -148,7 +148,7 @@ func (gui *Gui) handleToggleFileForPatch(g *gocui.Gui, v *gocui.View) error {
// if there is any file that hasn't been fully added we'll fully add everything,
// otherwise we'll remove everything
adding := node.AnyFile(func(file *models.CommitFile) bool {
- return gui.GitCommand.PatchManager.GetFileStatus(file.Name) != patch.WHOLE
+ return gui.GitCommand.PatchManager.GetFileStatus(file.Name, gui.State.CommitFileChangeManager.GetParent()) != patch.WHOLE
})
err := node.ForEachFile(func(file *models.CommitFile) error {