From f6aeb7859a46372b7f19a2ca22fea52f356f42a5 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Thu, 24 Jan 2013 20:25:32 +0100 Subject: [PATCH] Added a "show log" menu command in Git AddIn. --- src/AddIns/VersionControl/GitAddIn/GitAddIn.addin | 4 ++++ src/AddIns/VersionControl/GitAddIn/Src/Commands.cs | 8 ++++++++ src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/src/AddIns/VersionControl/GitAddIn/GitAddIn.addin b/src/AddIns/VersionControl/GitAddIn/GitAddIn.addin index a8f7c47bda..2bbb32c7f1 100644 --- a/src/AddIns/VersionControl/GitAddIn/GitAddIn.addin +++ b/src/AddIns/VersionControl/GitAddIn/GitAddIn.addin @@ -36,6 +36,10 @@ label = "Git ${res:AddIns.Subversion.Diff}..." icon = "Svn.Diff" class = "ICSharpCode.GitAddIn.GitDiffCommand"/> + + diff --git a/src/AddIns/VersionControl/GitAddIn/Src/Commands.cs b/src/AddIns/VersionControl/GitAddIn/Src/Commands.cs index 232b58368e..d0af47f6c2 100644 --- a/src/AddIns/VersionControl/GitAddIn/Src/Commands.cs +++ b/src/AddIns/VersionControl/GitAddIn/Src/Commands.cs @@ -92,4 +92,12 @@ namespace ICSharpCode.GitAddIn GitGuiWrapper.Diff(filename, callback); } } + + public class GitLogCommand : GitCommand + { + protected override void Run(string filename, Action callback) + { + GitGuiWrapper.Log(filename, callback); + } + } } diff --git a/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs b/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs index 5825d08223..ee8f962536 100644 --- a/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs +++ b/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs @@ -95,5 +95,10 @@ namespace ICSharpCode.GitAddIn { Proc("diff", fileName, callback); } + + public static void Log(string fileName, Action callback) + { + Proc("log", fileName, callback); + } } }