diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-03-31 22:46:42 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-02 11:00:15 +1100 |
commit | 7364525bf5ae7b6b4ff8f0e4381e1014726219ad (patch) | |
tree | 1014f1c8e1dcd6aace604db674ac816a1252cae8 /pkg/gui/presentation | |
parent | 54910fdb76f8a699d2cfb96459b75b60485fd3f7 (diff) |
do not show commit files of another parent as added to the patch
Diffstat (limited to 'pkg/gui/presentation')
-rw-r--r-- | pkg/gui/presentation/commit_files.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/presentation/commit_files.go b/pkg/gui/presentation/commit_files.go index bf8b6243b..4980f6c50 100644 --- a/pkg/gui/presentation/commit_files.go +++ b/pkg/gui/presentation/commit_files.go @@ -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 |