1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

do not show commit files of another parent as added to the patch

This commit is contained in:
Jesse Duffield
2021-03-31 22:46:42 +11:00
parent 54910fdb76
commit 7364525bf5
4 changed files with 9 additions and 5 deletions

View File

@ -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 {