diff --git a/src/AddIns/VersionControl/GitAddIn/GitAddIn.csproj b/src/AddIns/VersionControl/GitAddIn/GitAddIn.csproj
index d3ee4201a5..64debaa93f 100644
--- a/src/AddIns/VersionControl/GitAddIn/GitAddIn.csproj
+++ b/src/AddIns/VersionControl/GitAddIn/GitAddIn.csproj
@@ -7,7 +7,7 @@
Library
ICSharpCode.GitAddIn
GitAddIn
- ..\..\..\..\AddIns\AddIns\VersionControl\
+ ..\..\..\..\AddIns\VersionControl\
False
False
4
diff --git a/src/AddIns/VersionControl/GitAddIn/Src/Git.cs b/src/AddIns/VersionControl/GitAddIn/Src/Git.cs
index c2cc325a6a..7d0d321760 100644
--- a/src/AddIns/VersionControl/GitAddIn/Src/Git.cs
+++ b/src/AddIns/VersionControl/GitAddIn/Src/Git.cs
@@ -74,7 +74,7 @@ namespace ICSharpCode.GitAddIn
public static void RunGit(string workingDir, string arguments, Action finished)
{
- GitMessageView.AppendLine("$ git " + arguments);
+ GitMessageView.AppendLine(workingDir + "> git " + arguments);
ProcessRunner runner = new ProcessRunner();
runner.WorkingDirectory = workingDir;
runner.LogStandardOutputAndError = false;
@@ -121,6 +121,6 @@ namespace ICSharpCode.GitAddIn
}
}
}
- */
+ */
}
}
diff --git a/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs b/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs
index 004d324fef..d7fc82d9cc 100644
--- a/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs
+++ b/src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs
@@ -8,8 +8,8 @@
using System;
using System.Diagnostics;
using System.Text;
-
using ICSharpCode.Core;
+using ICSharpCode.SharpDevelop.Gui;
using Microsoft.Win32;
namespace ICSharpCode.GitAddIn
@@ -48,7 +48,9 @@ namespace ICSharpCode.GitAddIn
{
string path = GetPathFromRegistry("ProcPath");
if (path == null) {
- MessageService.ShowError("Could not find TortoiseGit.");
+ using (var dlg = new ToolNotFoundDialog("${res:AddIns.Git.TortoiseGitRequired}", "http://code.google.com/p/tortoisegit/")) {
+ dlg.ShowDialog(WorkbenchSingleton.MainWin32Window);
+ }
} else {
try {
StringBuilder arguments = new StringBuilder();
diff --git a/src/AddIns/VersionControl/GitAddIn/Src/GitStatusCache.cs b/src/AddIns/VersionControl/GitAddIn/Src/GitStatusCache.cs
index 1d7fed2702..56717d71b6 100644
--- a/src/AddIns/VersionControl/GitAddIn/Src/GitStatusCache.cs
+++ b/src/AddIns/VersionControl/GitAddIn/Src/GitStatusCache.cs
@@ -82,11 +82,21 @@ namespace ICSharpCode.GitAddIn
runner.WorkingDirectory = wcRoot;
runner.LogStandardOutputAndError = false;
runner.OutputLineReceived += delegate(object sender, LineReceivedEventArgs e) {
- if (string.IsNullOrEmpty(e.Line))
- return;
- statusSet.AddEntry(e.Line, GitStatus.OK);
+ if (!string.IsNullOrEmpty(e.Line)) {
+ statusSet.AddEntry(e.Line, GitStatus.OK);
+ }
+ };
+
+ string command = "git ls-files";
+ bool hasErrors = false;
+ runner.ErrorLineReceived += delegate(object sender, LineReceivedEventArgs e) {
+ if (!hasErrors) {
+ hasErrors = true;
+ GitMessageView.AppendLine(runner.WorkingDirectory + "> " + command);
+ }
+ GitMessageView.AppendLine(e.Line);
};
- runner.Start("cmd", "/c git ls-files");
+ runner.Start("cmd", "/c " + command);
runner.WaitForExit();
}
@@ -96,14 +106,23 @@ namespace ICSharpCode.GitAddIn
runner.WorkingDirectory = wcRoot;
runner.LogStandardOutputAndError = false;
runner.OutputLineReceived += delegate(object sender, LineReceivedEventArgs e) {
- if (string.IsNullOrEmpty(e.Line))
- return;
- Match m = statusParseRegex.Match(e.Line);
- if (m.Success) {
- statusSet.AddEntry(m.Groups[2].Value, StatusFromText(m.Groups[1].Value));
+ if (!string.IsNullOrEmpty(e.Line)) {
+ Match m = statusParseRegex.Match(e.Line);
+ if (m.Success) {
+ statusSet.AddEntry(m.Groups[2].Value, StatusFromText(m.Groups[1].Value));
+ }
+ }
+ };
+ string command = "git status -a --untracked-files=no";
+ bool hasErrors = false;
+ runner.ErrorLineReceived += delegate(object sender, LineReceivedEventArgs e) {
+ if (!hasErrors) {
+ hasErrors = true;
+ GitMessageView.AppendLine(runner.WorkingDirectory + "> " + command);
}
+ GitMessageView.AppendLine(e.Line);
};
- runner.Start("cmd", "/c git status -a --untracked-files=no");
+ runner.Start("cmd", "/c " + command);
runner.WaitForExit();
}
diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/ToolNotFoundDialog.cs b/src/Main/Base/Project/Src/Gui/Dialogs/ToolNotFoundDialog.cs
index 03e84ad160..c29148cdb7 100644
--- a/src/Main/Base/Project/Src/Gui/Dialogs/ToolNotFoundDialog.cs
+++ b/src/Main/Base/Project/Src/Gui/Dialogs/ToolNotFoundDialog.cs
@@ -23,7 +23,7 @@ namespace ICSharpCode.SharpDevelop.Gui
/// The description text
/// The link target (with leading http://)
/// 32x32 icon to display next to the description. May be null.
- public ToolNotFoundDialog(string description, string linkTarget, Image icon)
+ public ToolNotFoundDialog(string description, string linkTarget, Image icon = null)
{
// The InitializeComponent() call is required for Windows Forms designer support.
InitializeComponent();