From 12bf851c7d595f077260be03c8e298646dd333ce Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 22 Aug 2020 16:46:19 +1000 Subject: faster patch manager --- pkg/commands/git.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pkg/commands/git.go') diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 57121955d..6db81e652 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -144,7 +144,7 @@ func NewGitCommand(log *logrus.Entry, osCommand *OSCommand, tr *i18n.Localizer, PushToCurrent: pushToCurrent, } - gitCommand.PatchManager = patch.NewPatchManager(log, gitCommand.ApplyPatch) + gitCommand.PatchManager = patch.NewPatchManager(log, gitCommand.ApplyPatch, gitCommand.ShowCommitFile) return gitCommand, nil } @@ -1077,7 +1077,12 @@ func (c *GitCommand) GetCommitFilesFromFilenames(filenames string, parent string for _, file := range strings.Split(strings.TrimRight(filenames, "\n"), "\n") { status := patch.UNSELECTED if patchManager != nil && patchManager.Parent == parent { - status = patchManager.GetFileStatus(file) + var err error + status, err = patchManager.GetFileStatus(file) + if err != nil { + c.Log.Error(err) + continue + } } commitFiles = append(commitFiles, &CommitFile{ -- cgit v1.2.3