mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-13 05:15:53 +02:00
do not show commit files of another parent as added to the patch
This commit is contained in:
parent
54910fdb76
commit
7364525bf5
4 changed files with 9 additions and 5 deletions
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
|
||||
func GetCommitFileLine(name string, diffName string, commitFile *models.CommitFile, patchManager *patch.PatchManager) string {
|
||||
func GetCommitFileLine(name string, diffName string, commitFile *models.CommitFile, patchManager *patch.PatchManager, parent string) string {
|
||||
yellow := color.New(color.FgYellow)
|
||||
green := color.New(color.FgGreen)
|
||||
defaultColor := color.New(theme.DefaultTextColor)
|
||||
|
@ -22,7 +22,7 @@ func GetCommitFileLine(name string, diffName string, commitFile *models.CommitFi
|
|||
if diffName == name {
|
||||
colour = diffTerminalColor
|
||||
} else if commitFile != nil {
|
||||
status := patchManager.GetFileStatus(commitFile.Name)
|
||||
status := patchManager.GetFileStatus(commitFile.Name, parent)
|
||||
switch status {
|
||||
case patch.UNSELECTED:
|
||||
colour = defaultColor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue