Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'examples/general.c')
-rw-r--r--examples/general.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/general.c b/examples/general.c
index 0a908bc48..4585a4af5 100644
--- a/examples/general.c
+++ b/examples/general.c
@@ -273,7 +273,7 @@ int main (int argc, char** argv)
// Once you have the entry object, you can access the content or subtree (or commit, in the case
// of submodules) that it points to. You can also get the mode if you want.
- git_tree_entry_2object(&objt, repo, entry); // blob
+ git_tree_entry_to_object(&objt, repo, entry); // blob
// Remember to close the looked-up object once you are done using it
git_object_free(objt);
@@ -335,7 +335,7 @@ int main (int argc, char** argv)
// We can then lookup and parse the commited pointed at by the returned OID;
// note that this operation is specially fast since the raw contents of the commit object will
// be cached in memory
- while ((git_revwalk_next(&oid, walk)) == GIT_SUCCESS) {
+ while ((git_revwalk_next(&oid, walk)) == 0) {
error = git_commit_lookup(&wcommit, repo, &oid);
cmsg = git_commit_message(wcommit);
cauth = git_commit_author(wcommit);