mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
refactor: remove context menu items about LFS tracking from changes and revision files
This commit is contained in:
parent
9ff28dff72
commit
304b175b4b
1 changed files with 0 additions and 35 deletions
|
@ -550,41 +550,6 @@ namespace SourceGit.ViewModels
|
||||||
lfs.Header = App.Text("GitLFS");
|
lfs.Header = App.Text("GitLFS");
|
||||||
lfs.Icon = App.CreateMenuIcon("Icons.LFS");
|
lfs.Icon = App.CreateMenuIcon("Icons.LFS");
|
||||||
|
|
||||||
var isLFSFiltered = new Commands.IsLFSFiltered(_repo.FullPath, path).Result();
|
|
||||||
if (!isLFSFiltered)
|
|
||||||
{
|
|
||||||
var filename = Path.GetFileName(path);
|
|
||||||
var lfsTrackThisFile = new MenuItem();
|
|
||||||
lfsTrackThisFile.Header = App.Text("GitLFS.Track", filename);
|
|
||||||
lfsTrackThisFile.Click += async (_, e) =>
|
|
||||||
{
|
|
||||||
var succ = await Task.Run(() => new Commands.LFS(_repo.FullPath).Track(filename, true));
|
|
||||||
if (succ)
|
|
||||||
App.SendNotification(_repo.FullPath, $"Tracking file named {filename} successfully!");
|
|
||||||
|
|
||||||
e.Handled = true;
|
|
||||||
};
|
|
||||||
lfs.Items.Add(lfsTrackThisFile);
|
|
||||||
|
|
||||||
var extension = Path.GetExtension(path);
|
|
||||||
if (!string.IsNullOrEmpty(extension))
|
|
||||||
{
|
|
||||||
var lfsTrackByExtension = new MenuItem();
|
|
||||||
lfsTrackByExtension.Header = App.Text("GitLFS.TrackByExtension", extension);
|
|
||||||
lfsTrackByExtension.Click += async (_, e) =>
|
|
||||||
{
|
|
||||||
var succ = await Task.Run(() => new Commands.LFS(_repo.FullPath).Track("*" + extension));
|
|
||||||
if (succ)
|
|
||||||
App.SendNotification(_repo.FullPath, $"Tracking all *{extension} files successfully!");
|
|
||||||
|
|
||||||
e.Handled = true;
|
|
||||||
};
|
|
||||||
lfs.Items.Add(lfsTrackByExtension);
|
|
||||||
}
|
|
||||||
|
|
||||||
lfs.Items.Add(new MenuItem() { Header = "-" });
|
|
||||||
}
|
|
||||||
|
|
||||||
var lfsLock = new MenuItem();
|
var lfsLock = new MenuItem();
|
||||||
lfsLock.Header = App.Text("GitLFS.Locks.Lock");
|
lfsLock.Header = App.Text("GitLFS.Locks.Lock");
|
||||||
lfsLock.Icon = App.CreateMenuIcon("Icons.Lock");
|
lfsLock.Icon = App.CreateMenuIcon("Icons.Lock");
|
||||||
|
|
Loading…
Reference in a new issue