| 20 | } |
| 21 | |
| 22 | std::shared_ptr<Tree> Index::writeTree(Repository& repository) |
| 23 | { |
| 24 | git_oid treeOid; |
| 25 | auto error = git_index_write_tree(&treeOid, _index); |
| 26 | GitException::ThrowOnError(error); |
| 27 | |
| 28 | git_tree* tree; |
| 29 | error = git_tree_lookup(&tree, repository._get(), &treeOid); |
| 30 | GitException::ThrowOnError(error); |
| 31 | |
| 32 | return std::make_shared<Tree>(tree); |
| 33 | } |
| 34 | |
| 35 | void Index::addAll() |
| 36 | { |