static ObjectId() { ZeroId = new ObjectId(0, 0, 0, 0, 0); ZeroIdString = ZeroId.ToString(); }
private static string BuildReflogString(Repository repo, ObjectId oldCommit, ObjectId commit, string message) { PersonIdent me = new PersonIdent(repo); string initial = ""; if (oldCommit == null) { oldCommit = ObjectId.ZeroId; initial = " (initial)"; } string s = oldCommit.ToString() + " " + commit.ToString() + " " + me.ToExternalString() + "\t" + message + initial; return s; }
/// <summary> /// Convert an ObjectId into a hex string representation. /// </summary> /// <param name="i">The id to convert. May be null.</param> /// <returns>The hex string conversion of this id's content.</returns> public static string ToString(ObjectId i) { return i != null ? i.ToString() : ZeroIdString; }