repo git: we only need to determine CurrentRevision once per session.

This commit is contained in:
Hylke Bons 2011-11-13 00:39:29 +00:00
parent 1100fa205b
commit 07b727bb72

View file

@ -30,8 +30,11 @@ namespace SparkleLib {
base (path, backend) { } base (path, backend) { }
private string identifier = null;
public override string Identifier { public override string Identifier {
get { get {
if (string.IsNullOrEmpty (this.identifier)) {
// Because git computes a hash based on content, // Because git computes a hash based on content,
// author, and timestamp; it is unique enough to // author, and timestamp; it is unique enough to
@ -48,7 +51,10 @@ namespace SparkleLib {
if (output.Length < 40) if (output.Length < 40)
return null; return null;
return output.Substring (0, 40); this.identifier = output.Substring (0, 40);
}
return this.identifier;
} }
} }