Browse Source

Add git blame

pull/66/head
Linquize 13 years ago
parent
commit
963af0c6e9
  1. 4
      src/AddIns/VersionControl/GitAddIn/GitAddIn.addin
  2. 8
      src/AddIns/VersionControl/GitAddIn/Src/Commands.cs
  3. 5
      src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs

4
src/AddIns/VersionControl/GitAddIn/GitAddIn.addin

@ -40,6 +40,10 @@
<MenuItem id = "GitLog" <MenuItem id = "GitLog"
label = "Git ${res:AddIns.Subversion.ShowLog}..." label = "Git ${res:AddIns.Subversion.ShowLog}..."
class = "ICSharpCode.GitAddIn.GitLogCommand"/> class = "ICSharpCode.GitAddIn.GitLogCommand"/>
<MenuItem id = "GitBlame"
label = "Git ${res:AddIns.Subversion.Blame}..."
class = "ICSharpCode.GitAddIn.GitBlameCommand"/>
</Condition> </Condition>
</Path> </Path>

8
src/AddIns/VersionControl/GitAddIn/Src/Commands.cs

@ -100,4 +100,12 @@ namespace ICSharpCode.GitAddIn
GitGuiWrapper.Log(filename, callback); GitGuiWrapper.Log(filename, callback);
} }
} }
public class GitBlameCommand : GitCommand
{
protected override void Run(string filename, Action callback)
{
GitGuiWrapper.Blame(filename, callback);
}
}
} }

5
src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs

@ -100,5 +100,10 @@ namespace ICSharpCode.GitAddIn
{ {
Proc("log", fileName, callback); Proc("log", fileName, callback);
} }
public static void Blame(string fileName, Action callback)
{
Proc("blame", fileName, callback);
}
} }
} }

Loading…
Cancel
Save