private ObjectId ResolveSimple(string revstr) { if (ObjectId.IsId(revstr)) { return(ObjectId.FromString(revstr)); } Ref r = _refDb.ReadRef(revstr); return(r != null ? r.ObjectId : null); }
private static bool isValidHead(FileInfo head) { string r = readFirstLine(head); return(head.Exists && r != null && (r.StartsWith("ref: refs/") || ObjectId.IsId(r))); }