From 9f71c8d2b9cd971df454362dea34dd91af200568 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 23 Aug 2020 15:04:12 +1000 Subject: [PATCH] rename Status to PatchStatus --- pkg/commands/commit_file.go | 4 ++-- pkg/commands/git.go | 2 +- pkg/gui/presentation/commit_files.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/commands/commit_file.go b/pkg/commands/commit_file.go index 9aca23855..c2131ace1 100644 --- a/pkg/commands/commit_file.go +++ b/pkg/commands/commit_file.go @@ -6,8 +6,8 @@ type CommitFile struct { Parent string Name string - // Status tells us whether the file has been wholly or partially added to a patch. We might want to pull this logic up into the gui package and make it a map like we do with cherry picked commits - Status int // one of 'WHOLE' 'PART' 'NONE' + // PatchStatus tells us whether the file has been wholly or partially added to a patch. We might want to pull this logic up into the gui package and make it a map like we do with cherry picked commits + PatchStatus int // one of 'WHOLE' 'PART' 'NONE' ChangeStatus string // e.g. 'A' for added or 'M' for modified. This is based on the result from git diff --name-status } diff --git a/pkg/commands/git.go b/pkg/commands/git.go index d5577068a..64a4aa9d1 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -1080,7 +1080,7 @@ func (c *GitCommand) GetCommitFilesFromFilenames(filenames string, parent string Parent: parent, Name: name, ChangeStatus: changeStatus, - Status: status, + PatchStatus: status, }) } diff --git a/pkg/gui/presentation/commit_files.go b/pkg/gui/presentation/commit_files.go index d930c60dc..51107bb83 100644 --- a/pkg/gui/presentation/commit_files.go +++ b/pkg/gui/presentation/commit_files.go @@ -31,7 +31,7 @@ func getCommitFileDisplayStrings(f *commands.CommitFile, diffed bool) []string { diffTerminalColor := color.New(theme.DiffTerminalColor) var colour *color.Color - switch f.Status { + switch f.PatchStatus { case patch.UNSELECTED: colour = defaultColor case patch.WHOLE: