caf8233812
ba372efbff
@ -409,6 +409,10 @@ They will stop working after removing this AddIn! Are you sure you want to conti
<data name="AddIns.ClassDiagram.ShowClassDiagram" xml:space="preserve">
<value>Show Class Diagram</value>
</data>
<data name="AddIns.Git.Sync" xml:space="preserve">
<value>Sync</value>
<comment>Synchronize changes with remote repository</comment>
<data name="AddIns.Git.TortoiseGitRequired" xml:space="preserve">
<value>TortoiseGit needs to be installed to execute this action.</value>
<comment>Error message when executing git command but TortoiseGit cannot be found</comment>
@ -40,6 +40,18 @@
<MenuItem id = "GitLog"
label = "Git ${res:AddIns.Subversion.ShowLog}..."
class = "ICSharpCode.GitAddIn.GitLogCommand"/>
<MenuItem id = "GitSync"
label = "Git ${res:AddIns.Git.Sync}..."
class = "ICSharpCode.GitAddIn.GitSyncCommand"/>
<MenuItem id = "GitBlame"
label = "Git ${res:AddIns.Subversion.Blame}..."
class = "ICSharpCode.GitAddIn.GitBlameCommand"/>
<MenuItem id = "GitSettings"
label = "Git ${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.SettingsGroupBox}"
class = "ICSharpCode.GitAddIn.GitSettingsCommand"/>
</Condition>
</Path>
@ -116,4 +116,28 @@ namespace ICSharpCode.GitAddIn
GitGuiWrapper.Log(filename, callback);
}
public class GitSyncCommand : GitCommand
{
protected override void Run(string filename, Action callback)
GitGuiWrapper.Sync(filename, callback);
public class GitBlameCommand : GitCommand
GitGuiWrapper.Blame(filename, callback);
public class GitSettingsCommand : GitCommand
GitGuiWrapper.ShowGitSettings(filename, callback);
@ -119,5 +119,20 @@ namespace ICSharpCode.GitAddIn
Proc("log", fileName, callback);
public static void Sync(string fileName, Action callback)
Proc("sync", fileName, callback);
public static void Blame(string fileName, Action callback)
Proc("blame", fileName, callback);
public static void ShowGitSettings(string fileName, Action callback)
Proc("settings", fileName, callback);