]> git.proxmox.com Git - libgit2.git/blobdiff - src/notes.c
New upstream version 1.0.0+dfsg.1
[libgit2.git] / src / notes.c
index 4633a16eabcb7c933293324fff11657f869d0051..68d2ae9ec6263e7509dbd23ba84deb857fdbe4fd 100644 (file)
@@ -808,8 +808,11 @@ int git_note_next(
 
        git_oid_cpy(note_id, &item->id);
 
-       if (!(error = process_entry_path(item->path, annotated_id)))
-               git_iterator_advance(NULL, it);
+       if ((error = process_entry_path(item->path, annotated_id)) < 0)
+               return error;
 
-       return error;
+       if ((error = git_iterator_advance(NULL, it)) < 0 && error != GIT_ITEROVER)
+               return error;
+
+       return 0;
 }