Skip to content

Commit

Permalink
Stop using Commands, might fix #68
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir L. Boulema committed Jul 30, 2021
1 parent ce74efb commit af45871
Showing 35 changed files with 0 additions and 104 deletions.
3 changes: 0 additions & 3 deletions TGit/Commands/Context/AddFileCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class AddFileCommand : BaseCommand<AddFileCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitFileCommand("add");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/Context/BlameFileCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class BlameFileCommand : BaseCommand<BlameFileCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitFileCommand("blame", $"/line:{await FileHelper.GetActiveDocumentCurrentLine()}");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/Context/CommitFileCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class CommitFileCommand : BaseCommand<CommitFileCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

var options = await General.GetLiveInstanceAsync();
var commitMessage = await GitHelper.GetCommitMessage(options.CommitMessage);
var bugId = await GitHelper.GetCommitMessage(options.BugId);
3 changes: 0 additions & 3 deletions TGit/Commands/Context/DiffFileCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class DiffFileCommand : BaseCommand<DiffFileCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitFileCommand("diff");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/Context/FetchFileCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class FetchFileCommand : BaseCommand<FetchFileCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitFileCommand("fetch");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/Context/MergeFileCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class MergeFileCommand : BaseCommand<MergeFileCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitFileCommand("merge");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/Context/PrefDiffFileCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using System.IO;
using Task = System.Threading.Tasks.Task;

@@ -12,8 +11,6 @@ internal sealed class PrefDiffFileCommand : BaseCommand<PrefDiffFileCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

var filePath = await FileHelper.GetActiveDocumentFilePath();
var exactFilePath = FileHelper.GetExactFileName(filePath);

3 changes: 0 additions & 3 deletions TGit/Commands/Context/PullFileCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class PullFileCommand : BaseCommand<PullFileCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitFileCommand("pull");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/Context/RevertFileCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class RevertFileCommand : BaseCommand<RevertFileCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitFileCommand("revert");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/AbortMergeCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class AbortMergeCommand : BaseCommand<AbortMergeCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("merge", "/abort");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/ApplyStashCommand.cs
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -12,8 +11,6 @@ internal sealed class ApplyStashCommand : BaseCommand<ApplyStashCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("reflog", "/ref:refs/stash");
}

3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/BranchCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class BranchCommand : BaseCommand<BranchCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("branch");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/BrowseRefCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class BrowseRefCommand : BaseCommand<BrowseRefCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("refbrowse");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/CleanupCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class CleanupCommand : BaseCommand<CleanupCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("cleanup");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/CommitCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class CommitCommand : BaseCommand<CommitCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

var options = await General.GetLiveInstanceAsync();
var commitMessage = await GitHelper.GetCommitMessage(options.CommitMessage);
var bugId = await GitHelper.GetCommitMessage(options.BugId);
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/CreateStashCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class CreateStashCommand : BaseCommand<CreateStashCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("stashsave");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/DiskBrowserCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class DiskBrowserCommand : BaseCommand<DiskBrowserCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

ProcessHelper.Start(await FileHelper.GetSolutionDir());
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/FetchCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class FetchCommand : BaseCommand<FetchCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("fetch");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/MergeCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class MergeCommand : BaseCommand<MergeCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("merge");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/PullCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class PullCommand : BaseCommand<PullCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("pull");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/PushCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class PushCommand : BaseCommand<PushCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("push");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/RebaseCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class RebaseCommand : BaseCommand<RebaseCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("rebase");
}
}
3 changes: 0 additions & 3 deletions TGit/Commands/MainMenu/RepoBrowserCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell;
using SamirBoulema.TGit.Helpers;
using System.ComponentModel.Design;
using Task = System.Threading.Tasks.Task;

namespace SamirBoulema.TGit.Commands
@@ -11,8 +10,6 @@ internal sealed class RepoBrowserCommand : BaseCommand<RepoBrowserCommand>
{
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
await KnownCommands.File_SaveAll.ExecuteAsync();

await ProcessHelper.RunTortoiseGitCommand("repobrowser");
}
}
Loading

0 comments on commit af45871

Please sign in to comment.