marcelocantos/libgit2pp

Round out iterator support

Closed this issue · 3 comments

Currently supports git_reference_iterator and git_config_iterator.

Add support for:

  • git_branch_iterator¹
  • git_config_iterator
  • git_index_conflict_iterator¹
  • git_index_iterator
  • git_note_iterator¹
  • git_rebase
  • git_reference_iterator
  • git_revwalk

¹Corresponding …_next has additional parameters.

  1. Implemented git_index_iterator support. 87f2db9
  2. Removed git_note_commit_iterator from the issue checklist (git_note_commit_iterator_new creates a git_note_iterator).

The others have additional parameters, complicating the behavior:

  • git_branch_iterator: git_branch_next(git_reference **out, git_branch_t *out_type…) (doc)
  • git_index_conflict_iterator: git_index_conflict_next(const git_index_entry **ancestor_out, const git_index_entry **our_out, const git_index_entry **their_out…) (doc)
  • git_note_iterator: git_note_next(git_oid *note_id, git_oid *annotated_id…) (doc)

I think the basic idea should be that all but the last parameter should be treated as fields of a single output type, extractable via std::tie or similar.

Fixed index iterator support. 9970820

All iterators implemented with demo update to showcase them. Rebase is untested. #6