Skip to content

Commit d3bcbec

Browse files
author
Samir Boulema
committed
fix: Save before executing git command doesn't work anymore in VS2022 #75
1 parent 2d97bfb commit d3bcbec

40 files changed

+96
-3
lines changed

TGit/Commands/Context/AddFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ internal sealed class AddFileCommand : BaseCommand<AddFileCommand>
1010
{
1111
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1212
{
13+
await CommandHelper.SaveFiles();
14+
1315
await ProcessHelper.RunTortoiseGitFileCommand("add");
1416
}
1517
}

TGit/Commands/Context/BlameFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ internal sealed class BlameFileCommand : BaseCommand<BlameFileCommand>
1010
{
1111
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1212
{
13+
await CommandHelper.SaveFiles();
14+
1315
await ProcessHelper.RunTortoiseGitFileCommand("blame", $"/line:{await FileHelper.GetActiveDocumentCurrentLine()}");
1416
}
1517
}

TGit/Commands/Context/CommitFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ internal sealed class CommitFileCommand : BaseCommand<CommitFileCommand>
1010
{
1111
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1212
{
13+
await CommandHelper.SaveFiles();
14+
1315
var options = await General.GetLiveInstanceAsync();
1416
var commitMessage = await GitHelper.GetCommitMessage(options.CommitMessage);
1517
var bugId = await GitHelper.GetCommitMessage(options.BugId);

TGit/Commands/Context/DiffFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ internal sealed class DiffFileCommand : BaseCommand<DiffFileCommand>
1010
{
1111
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1212
{
13+
await CommandHelper.SaveFiles();
14+
1315
await ProcessHelper.RunTortoiseGitFileCommand("diff");
1416
}
1517
}

TGit/Commands/Context/FetchFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ internal sealed class FetchFileCommand : BaseCommand<FetchFileCommand>
1010
{
1111
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1212
{
13+
await CommandHelper.SaveFiles();
14+
1315
await ProcessHelper.RunTortoiseGitFileCommand("fetch");
1416
}
1517
}

TGit/Commands/Context/MergeFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ internal sealed class MergeFileCommand : BaseCommand<MergeFileCommand>
1010
{
1111
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1212
{
13+
await CommandHelper.SaveFiles();
14+
1315
await ProcessHelper.RunTortoiseGitFileCommand("merge");
1416
}
1517
}

TGit/Commands/Context/PrefDiffFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ internal sealed class PrefDiffFileCommand : BaseCommand<PrefDiffFileCommand>
1111
{
1212
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1313
{
14+
await CommandHelper.SaveFiles();
15+
1416
var filePath = await FileHelper.GetActiveDocumentFilePath();
1517
var exactFilePath = FileHelper.GetExactFileName(filePath);
1618

TGit/Commands/Context/PullFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ internal sealed class PullFileCommand : BaseCommand<PullFileCommand>
1010
{
1111
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1212
{
13+
await CommandHelper.SaveFiles();
14+
1315
await ProcessHelper.RunTortoiseGitFileCommand("pull");
1416
}
1517
}

TGit/Commands/Context/RevGraphFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ internal sealed class RevGraphFileCommand : BaseCommand<RevGraphFileCommand>
1010
{
1111
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1212
{
13+
await CommandHelper.SaveFiles();
14+
1315
await ProcessHelper.RunTortoiseGitFileCommand("revisiongraph");
1416
}
1517
}

TGit/Commands/Context/RevertFileCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ internal sealed class RevertFileCommand : BaseCommand<RevertFileCommand>
1010
{
1111
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1212
{
13+
await CommandHelper.SaveFiles();
14+
1315
await ProcessHelper.RunTortoiseGitFileCommand("revert");
1416
}
1517
}

0 commit comments

Comments
 (0)