internal Change(Repository aRepository, Branch aBranch) { iRepository = aRepository; iBranch = aBranch; iParents = new List<IBranch>(); iParents.Add(iBranch); iWritten = false; if (iBranch.IsEmpty) { iRoot = new TreeModifiable(iRepository, iBranch.Commit.Tree); } else { iRoot = new TreeModifiable(iRepository, null); } }
public ITreeModifiable ModifyTree(string aName) { CheckWritten(); CheckDelete(aName); if (iTreeModifyList.ContainsKey(aName)) { throw (new GitException(aName + " already staged for modification")); } ITreeEntry item = Find(aName); if (item != null) { ITree tree = item.Item as ITree; if (tree != null) { TreeModifiable modifiable = new TreeModifiable(iRepository, tree); iTreeModifyList.Add(aName, modifiable); return (modifiable); } } throw (new GitException(aName + " not found")); }