libgit2/tests-clar/repo
Russell Belfer 9bea03ce77 Add INCLUDE_TREES, DONT_AUTOEXPAND iterator flags
This standardizes iterator behavior across all three iterators
(index, tree, and working directory).  Previously the working
directory iterator behaved differently from the other two.

Each iterator can now operate in one of three modes:

1. *No tree results, auto expand trees* means that only non-
   tree items will be returned and when a tree/directory is
   encountered, we will automatically descend into it.
2. *Tree results, auto expand trees* means that results will
   be given for every item found, including trees, but you
   only need to call normal git_iterator_advance to yield
   every item (i.e. trees returned with pre-order iteration).
3. *Tree results, no auto expand* means that calling the
   normal git_iterator_advance when looking at a tree will
   not descend into the tree, but will skip over it to the
   next entry in the parent.

Previously, behavior 1 was the only option for index and tree
iterators, and behavior 3 was the only option for workdir.

The main public API implications of this are that the
`git_iterator_advance_into()` call is now valid for all
iterators, not just working directory iterators, and all the
existing uses of working directory iterators explicitly use
the GIT_ITERATOR_DONT_AUTOEXPAND (for now).

Interestingly, the majority of the implementation was in the
index iterator, since there are no tree entries there and now
have to fake them.  The tree and working directory iterators
only required small modifications.
2013-03-06 16:52:01 -08:00
..
discover.c Extensions to rmdir and mkdir utilities 2012-11-09 13:52:06 -08:00
getters.c repo: ensure is_empty() checks there are no refs 2012-11-17 07:20:08 -08:00
hashfile.c Add tests and improve param checks 2012-09-11 17:26:21 -07:00
head.c Rename ref and reflog apis for consistency 2012-11-27 13:17:45 -08:00
headtree.c repo: Make git_repository_head_tree() return error codes 2012-11-22 18:51:06 +01:00
init.c Make mode handling during init more like git 2013-02-27 13:44:15 -08:00
iterator.c Add INCLUDE_TREES, DONT_AUTOEXPAND iterator flags 2013-03-06 16:52:01 -08:00
message.c tests: fix indentation in repo/message.c 2013-02-07 03:12:39 -08:00
open.c Extensions to rmdir and mkdir utilities 2012-11-09 13:52:06 -08:00
repo_helpers.c Rename ref and reflog apis for consistency 2012-11-27 13:17:45 -08:00
repo_helpers.h repository: Refine repository_head() error report 2012-11-12 00:14:51 +01:00
setters.c Reset all static variables to NULL in clar's __cleanup 2012-11-23 11:41:56 +01:00
state.c repo: fix state when HEAD is not detached 2012-11-04 12:13:42 -06:00