Removes modified/clean indicator

This commit is contained in:
benbierens 2023-11-13 13:05:44 +01:00
parent 537c37351a
commit 1f841ca629
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
1 changed files with 1 additions and 15 deletions

View File

@ -20,23 +20,9 @@ namespace DistTestCore
if (path == null) return "unknown"; if (path == null) return "unknown";
using var repo = new Repository(path); using var repo = new Repository(path);
var isModified = repo.RetrieveStatus().Any(IsModified);
var sha = repo.Head.Tip.Sha.Substring(0, 7); var sha = repo.Head.Tip.Sha.Substring(0, 7);
return K8sNameUtils.Format(sha + (isModified ? "_modified" : "_clean")); return K8sNameUtils.Format(sha);
}
private static bool IsModified(StatusEntry e)
{
return e.State == FileStatus.ModifiedInIndex ||
e.State == FileStatus.NewInIndex ||
e.State == FileStatus.RenamedInIndex ||
e.State == FileStatus.DeletedFromIndex ||
e.State == FileStatus.ModifiedInWorkdir ||
e.State == FileStatus.NewInWorkdir ||
e.State == FileStatus.RenamedInWorkdir ||
e.State == FileStatus.DeletedFromWorkdir;
} }
private static string? FindGitPath() private static string? FindGitPath()