Refactoring to get Git Version

This commit is contained in:
Philippe Miossec
2013-11-21 12:12:14 +01:00
parent 5246fe4542
commit 9d5cd86ed0
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ namespace Sep.Git.Tfs.Commands
stdout.WriteLine();
// show git version
globals.Repository.CommandOutputPipe(reader => stdout.Write(reader.ReadToEnd()), "--version");
stdout.WriteLine(globals.GitVersion);
}
private void DescribeGitTfs()
+13
View File
@@ -80,6 +80,19 @@ namespace Sep.Git.Tfs
public int GcCountdown { get; set; }
private string _gitVersion;
public string GitVersion
{
get
{
if (_gitVersion != null)
return _gitVersion;
if (Repository == null)
return null;
return _gitVersion = Repository.CommandOneline("--version");
}
}
public int GcPeriod
{
get { return 200; }