refactor: remove duplicated context menu to ignore untracked files under folder

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-06-19 09:12:27 +08:00
parent 6729d4e896
commit e81674912c
No known key found for this signature in database
13 changed files with 1 additions and 24 deletions

View file

@ -788,17 +788,6 @@ namespace SourceGit.ViewModels
};
addToIgnore.Items.Add(singleFile);
var byParentFolder = new MenuItem();
byParentFolder.Header = App.Text("WorkingCopy.AddToGitIgnore.InSameFolder");
byParentFolder.IsVisible = !isRooted;
byParentFolder.Click += (_, e) =>
{
var dir = Path.GetDirectoryName(change.Path)!.Replace('\\', '/').TrimEnd('/');
Commands.GitIgnore.Add(_repo.FullPath, dir + "/");
e.Handled = true;
};
addToIgnore.Items.Add(byParentFolder);
if (!string.IsNullOrEmpty(extension))
{
var byExtension = new MenuItem();