public Repository(string aPath)
{
iPath = aPath;
if (!Directory.Exists(iPath))
{
throw (new DirectoryNotFoundException());
}
// Open existing git
iFolder = new DirectoryInfo(iPath);
iFolderGit = GetSubFolder(iFolder, ".git");
iFolderObjects = GetSubFolder(iFolderGit, "objects");
iFolderInfo = GetSubFolder(iFolderObjects, "info");
iFolderPack = GetSubFolder(iFolderObjects, "pack");
iFolderRefs = GetSubFolder(iFolderGit, "refs");
iFolderHeads = GetSubFolder(iFolderRefs, "heads");
iFolderTags = GetSubFolder(iFolderRefs, "tags");
//iFolderRemotes = GetSubFolder(iFolderRefs, "remotes");
iOrigin = FindOrigin();
iMaster = FindMaster();
iBranches = FindBranches();
iRefs = FindRefs();
foreach (var entry in FindPackedRefs())
{
iRefs.Add(entry);
}
iPacks = FindPacks();
iHash = new Hash();
}