mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
faster patch manager
This commit is contained in:
@ -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{
|
||||
|
Reference in New Issue
Block a user