From 891198bfa9a3baf8715e82512d3c8eba052070d7 Mon Sep 17 00:00:00 2001 From: AraHaan Date: Sun, 27 Jun 2021 16:17:31 -0400 Subject: [PATCH] Fixed bug in GitInformation.IsTag where it will never be true even when it should be. (#47) Signed-off-by: AraHaan --- src/Elskom.GitInformation/Directory.Build.props | 4 ++-- src/Elskom.GitInformation/GitInformation.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Elskom.GitInformation/Directory.Build.props b/src/Elskom.GitInformation/Directory.Build.props index 4081408..b41bb15 100644 --- a/src/Elskom.GitInformation/Directory.Build.props +++ b/src/Elskom.GitInformation/Directory.Build.props @@ -6,8 +6,8 @@ GitBuildInformation Copyright (c) 2019-2021 A c# library that Registers git repository information on the assembly. - Initial Release. - 1.0.0 + Fixed bug in GitInformation.IsTag where it will never be true even when it should be. + 1.0.1 false en-US $(NoWarn);NU5104;NU5118 diff --git a/src/Elskom.GitInformation/GitInformation.cs b/src/Elskom.GitInformation/GitInformation.cs index 7cd9e42..8b31825 100644 --- a/src/Elskom.GitInformation/GitInformation.cs +++ b/src/Elskom.GitInformation/GitInformation.cs @@ -90,7 +90,7 @@ private GitInformation(string headdesc, string commit, string branchname) /// /// A value indicating whether refs point to a stable tag release. /// - public bool IsTag => this.Headdesc.StartsWith("refs/tags", StringComparison.Ordinal); + public bool IsTag => this.Headdesc.StartsWith("tags/", StringComparison.Ordinal); /// /// Applies the s that the specified contains.