Skip to content

Commit af45871

Browse files
author
Samir L. Boulema
committed
Stop using Commands, might fix #68
1 parent ce74efb commit af45871

35 files changed

+0
-104
lines changed

TGit/Commands/Context/AddFileCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class AddFileCommand : BaseCommand<AddFileCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitFileCommand("add");
1714
}
1815
}

TGit/Commands/Context/BlameFileCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class BlameFileCommand : BaseCommand<BlameFileCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitFileCommand("blame", $"/line:{await FileHelper.GetActiveDocumentCurrentLine()}");
1714
}
1815
}

TGit/Commands/Context/CommitFileCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class CommitFileCommand : BaseCommand<CommitFileCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
var options = await General.GetLiveInstanceAsync();
1714
var commitMessage = await GitHelper.GetCommitMessage(options.CommitMessage);
1815
var bugId = await GitHelper.GetCommitMessage(options.BugId);

TGit/Commands/Context/DiffFileCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class DiffFileCommand : BaseCommand<DiffFileCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitFileCommand("diff");
1714
}
1815
}

TGit/Commands/Context/FetchFileCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class FetchFileCommand : BaseCommand<FetchFileCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitFileCommand("fetch");
1714
}
1815
}

TGit/Commands/Context/MergeFileCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class MergeFileCommand : BaseCommand<MergeFileCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitFileCommand("merge");
1714
}
1815
}

TGit/Commands/Context/PrefDiffFileCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using System.IO;
65
using Task = System.Threading.Tasks.Task;
76

@@ -12,8 +11,6 @@ internal sealed class PrefDiffFileCommand : BaseCommand<PrefDiffFileCommand>
1211
{
1312
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1413
{
15-
await KnownCommands.File_SaveAll.ExecuteAsync();
16-
1714
var filePath = await FileHelper.GetActiveDocumentFilePath();
1815
var exactFilePath = FileHelper.GetExactFileName(filePath);
1916

TGit/Commands/Context/PullFileCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class PullFileCommand : BaseCommand<PullFileCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitFileCommand("pull");
1714
}
1815
}

TGit/Commands/Context/RevertFileCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class RevertFileCommand : BaseCommand<RevertFileCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitFileCommand("revert");
1714
}
1815
}

TGit/Commands/MainMenu/AbortMergeCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class AbortMergeCommand : BaseCommand<AbortMergeCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("merge", "/abort");
1714
}
1815
}

TGit/Commands/MainMenu/ApplyStashCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
44
using System;
5-
using System.ComponentModel.Design;
65
using Task = System.Threading.Tasks.Task;
76

87
namespace SamirBoulema.TGit.Commands
@@ -12,8 +11,6 @@ internal sealed class ApplyStashCommand : BaseCommand<ApplyStashCommand>
1211
{
1312
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1413
{
15-
await KnownCommands.File_SaveAll.ExecuteAsync();
16-
1714
await ProcessHelper.RunTortoiseGitCommand("reflog", "/ref:refs/stash");
1815
}
1916

TGit/Commands/MainMenu/BranchCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class BranchCommand : BaseCommand<BranchCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("branch");
1714
}
1815
}

TGit/Commands/MainMenu/BrowseRefCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class BrowseRefCommand : BaseCommand<BrowseRefCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("refbrowse");
1714
}
1815
}

TGit/Commands/MainMenu/CleanupCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class CleanupCommand : BaseCommand<CleanupCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("cleanup");
1714
}
1815
}

TGit/Commands/MainMenu/CommitCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class CommitCommand : BaseCommand<CommitCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
var options = await General.GetLiveInstanceAsync();
1714
var commitMessage = await GitHelper.GetCommitMessage(options.CommitMessage);
1815
var bugId = await GitHelper.GetCommitMessage(options.BugId);

TGit/Commands/MainMenu/CreateStashCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class CreateStashCommand : BaseCommand<CreateStashCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("stashsave");
1714
}
1815
}

TGit/Commands/MainMenu/DiskBrowserCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class DiskBrowserCommand : BaseCommand<DiskBrowserCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
ProcessHelper.Start(await FileHelper.GetSolutionDir());
1714
}
1815
}

TGit/Commands/MainMenu/FetchCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class FetchCommand : BaseCommand<FetchCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("fetch");
1714
}
1815
}

TGit/Commands/MainMenu/MergeCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class MergeCommand : BaseCommand<MergeCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("merge");
1714
}
1815
}

TGit/Commands/MainMenu/PullCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class PullCommand : BaseCommand<PullCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("pull");
1714
}
1815
}

TGit/Commands/MainMenu/PushCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class PushCommand : BaseCommand<PushCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("push");
1714
}
1815
}

TGit/Commands/MainMenu/RebaseCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class RebaseCommand : BaseCommand<RebaseCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("rebase");
1714
}
1815
}

TGit/Commands/MainMenu/RepoBrowserCommand.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Community.VisualStudio.Toolkit;
22
using Microsoft.VisualStudio.Shell;
33
using SamirBoulema.TGit.Helpers;
4-
using System.ComponentModel.Design;
54
using Task = System.Threading.Tasks.Task;
65

76
namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class RepoBrowserCommand : BaseCommand<RepoBrowserCommand>
1110
{
1211
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1312
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync();
15-
1613
await ProcessHelper.RunTortoiseGitCommand("repobrowser");
1714
}
1815
}

0 commit comments

Comments
 (0)