public Commit MapCommit(ObjectId id)
{
ObjectLoader or = OpenObject(id);
if (or == null)
{
return null;
}
byte[] raw = or.Bytes;
if (Constants.OBJ_COMMIT == or.Type)
{
return new Commit(this, id, raw);
}
throw new IncorrectObjectTypeException(id, ObjectType.Commit);
}
Repository::MapCommit ( string resolveString ) : Commit |
public void Refresh() { cache.Clear(); if (!string.IsNullOrEmpty(initFolder)) { try { this.repository = Repository.Open(initFolder); if (this.repository != null) { var id = repository.Resolve("HEAD"); var commit = repository.MapCommit(id); this.commitTree = (commit != null ? commit.TreeEntry : new Tree(repository)); this.index = repository.Index; this.index.RereadIfNecessary(); //this.ignoreHandler = new IgnoreHandler(repository); //this.watcher = new FileSystemWatcher(this.repository.WorkingDirectory.FullName); } } catch (Exception ex) { } } }