// open
auto repo = new Repository();
repo->open("/Users/shibukawa/dev/repo");
// Does HEAD exist?
repo->isheadUnborn(); => true if there are no commit
// get HEAD
auto head = repo->head();
// get all commits
auto repo->lookupCommit(head.target());
size_t parentCount = commit.parentCount();
for (size_t i = 0; i < parentCount; i++) {
parents.append(commit.parent(i));
}
// get folder entries in commit
auto entryCount = tree.entryCount();
for (size_t i = 0; i < entryCount; i++) {
auto childEntry = tree.entryByIndex(i);
}
Last active
August 29, 2015 14:04
-
-
Save shibukawa/82340902063970e68ddd to your computer and use it in GitHub Desktop.
libqgit2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment