diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-22 16:46:19 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 12bf851c7d595f077260be03c8e298646dd333ce (patch) | |
tree | 2efce3551a0e316c27008b62c3129ca729196847 /pkg/commands/git.go | |
parent | c837c54c39d4e15af3f26df646f550436b35d505 (diff) |
faster patch manager
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r-- | pkg/commands/git.go | 9 |
1 files changed, 7 insertions, 2 deletions
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{ |