From 963af0c6e92b19e775ebec0a7d70d05c5fb6ef80 Mon Sep 17 00:00:00 2001 From: Linquize Date: Sat, 31 Aug 2013 20:16:04 +0800 Subject: [PATCH] Add git blame --- 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 2bbb32c7f1..26172cf8ca 100644 --- a/src/AddIns/VersionControl/GitAddIn/GitAddIn.addin +++ b/src/AddIns/VersionControl/GitAddIn/GitAddIn.addin @@ -40,6 +40,10 @@ + + diff --git a/src/AddIns/VersionControl/GitAddIn/Src/Commands.cs b/src/AddIns/VersionControl/GitAddIn/Src/Commands.cs index d0af47f6c2..b978b5055f 100644 --- a/src/AddIns/VersionControl/GitAddIn/Src/Commands.cs +++ b/src/AddIns/VersionControl/GitAddIn/Src/Commands.cs @@ -100,4 +100,12 @@ namespace ICSharpCode.GitAddIn GitGuiWrapper.Log(filename, callback); } } + + public class GitBlameCommand : GitCommand + { + protected override void Run(string filename, Action callback) + { + GitGuiWrapper.Blame(filename, callback); + } + } } diff --git a/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs b/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs index ee8f962536..974ad1e184 100644 --- a/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs +++ b/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs @@ -100,5 +100,10 @@ namespace ICSharpCode.GitAddIn { Proc("log", fileName, callback); } + + public static void Blame(string fileName, Action callback) + { + Proc("blame", fileName, callback); + } } }