Skip to content
This repository was archived by the owner on May 7, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NetRevisionTool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ private static void MainWrapper()
/// <param name="severity">0 (trace message), 1 (success), 2 (warning), 3 (error), 4 (raw output).</param>
public static void ShowDebugMessage(string text, int severity = 0)
{
if (text == null)
return;

if (showDebugOutput)
{
var color = Console.ForegroundColor;
Expand Down
14 changes: 12 additions & 2 deletions NetRevisionTool/VcsProviders/GitProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

namespace NetRevisionTool.VcsProviders
{
internal class GitProvider : IVcsProvider
/// <summary>
/// Git specific.
/// </summary>
internal class GitProvider : IVcsProvider
{
#region Private data

Expand Down Expand Up @@ -140,13 +143,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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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