From f760d7ed9325e46aa5e2bd905dc18d56733e385e Mon Sep 17 00:00:00 2001 From: Hugh Gleaves Date: Wed, 3 May 2017 15:36:44 -0700 Subject: [PATCH 1/3] Suppress the warning about uncommitted changes unless the changed file is not AssemblyInfo.cs, AssemblyInfo.vb or AssemblyInfo.bak --- NetRevisionTool/Program.cs | 3 +++ NetRevisionTool/VcsProviders/GitProvider.cs | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NetRevisionTool/Program.cs b/NetRevisionTool/Program.cs index a090b11..97b47a3 100644 --- a/NetRevisionTool/Program.cs +++ b/NetRevisionTool/Program.cs @@ -313,6 +313,9 @@ private static void MainWrapper() /// 0 (trace message), 1 (success), 2 (warning), 3 (error), 4 (raw output). public static void ShowDebugMessage(string text, int severity = 0) { + if (text == null) + return; + if (showDebugOutput) { var color = Console.ForegroundColor; diff --git a/NetRevisionTool/VcsProviders/GitProvider.cs b/NetRevisionTool/VcsProviders/GitProvider.cs index 3ba34cb..8643406 100644 --- a/NetRevisionTool/VcsProviders/GitProvider.cs +++ b/NetRevisionTool/VcsProviders/GitProvider.cs @@ -140,13 +140,20 @@ public RevisionData ProcessDirectory(string path) line = null; while (!p.StandardOutput.EndOfStream) { - line = p.StandardOutput.ReadLine(); + string templine = p.StandardOutput.ReadLine(); + + // Do not consider this line if it contans any of the file names that can, conceivably appear in the status due to the tool itself. + + if (!(templine.Contains("AssemblyInfo.cs") || templine.Contains("AssemblyInfo.vb") || templine.Contains("AssemblyInfo.bak"))) + line = templine; + Program.ShowDebugMessage(line, 4); } if (!p.WaitForExit(1000)) { p.Kill(); } + data.IsModified = !string.IsNullOrEmpty(line); // Query the current branch From 6c69b4f38e3eb4fae2a21c36a3c8275844a67848 Mon Sep 17 00:00:00 2001 From: Hugh Gleaves Date: Thu, 4 May 2017 11:33:36 -0700 Subject: [PATCH 2/3] Comment --- NetRevisionTool/VcsProviders/GitProvider.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NetRevisionTool/VcsProviders/GitProvider.cs b/NetRevisionTool/VcsProviders/GitProvider.cs index 8643406..eff45c8 100644 --- a/NetRevisionTool/VcsProviders/GitProvider.cs +++ b/NetRevisionTool/VcsProviders/GitProvider.cs @@ -9,7 +9,10 @@ namespace NetRevisionTool.VcsProviders { - internal class GitProvider : IVcsProvider + /// + /// Git specific. + /// + internal class GitProvider : IVcsProvider { #region Private data From bba05f0d1466e217c7c42ae3d26b23e13a6119e1 Mon Sep 17 00:00:00 2001 From: Hugh Gleaves Date: Tue, 9 May 2017 12:47:45 -0700 Subject: [PATCH 3/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 521d338..c34a92d 100644 --- a/README.md +++ b/README.md @@ -28,3 +28,5 @@ By automating the copying of that revision ID into the application source code, ## Licence and terms of use This software is released under the terms of the GNU GPL licence, version 3. You can find the detailed terms and conditions in the download or on the [GNU website](http://www.gnu.org/licenses/gpl-3.0.html). + +This is a work in progress