optimize<LFS>: do NOT test LFS filter when LFS is not enabled

This commit is contained in:
leo 2021-06-07 14:14:53 +08:00
parent 2cb93d5a86
commit 9d6a411887
10 changed files with 67 additions and 33 deletions

View file

@ -17,6 +17,7 @@ namespace SourceGit.Views.Widgets {
private List<Models.Change> cachedChanges = new List<Models.Change>();
private string filter = null;
private bool isSelecting = false;
private bool isLFSEnabled = false;
public class ChangeNode {
public string Path { get; set; } = "";
@ -34,6 +35,7 @@ namespace SourceGit.Views.Widgets {
this.repo = repo;
this.range = range;
this.cachedChanges = changes;
this.isLFSEnabled = new Commands.LFS(repo).IsEnabled();
UpdateVisible();
}
@ -214,7 +216,8 @@ namespace SourceGit.Views.Widgets {
diffViewer.Diff(repo, new DiffViewer.Option() {
RevisionRange = revisions,
Path = change.Path,
OrgPath = change.OriginalPath
OrgPath = change.OriginalPath,
UseLFS = isLFSEnabled,
});
}