|
f01fa266
|
2012-02-23T11:17:48
|
|
Fix workdir iterator unit tests
This test is fragile if you leave extra files in the test
data directory, such as a foo.c~ file from editing with
Emacs. Who would do such a thing?
|
|
da337c80
|
2012-02-22T11:22:33
|
|
Iterator improvements from diff implementation
This makes two changes to iterator behavior: first, advance
can optionally do the work of returning the new current value.
This is such a common pattern that it really cleans up usage.
Second, for workdir iterators, this removes automatically
iterating into directories. That seemed like a good idea,
but when an entirely new directory hierarchy is introduced
into the workdir, there is no reason to iterate into it if
there are no corresponding entries in the tree/index that it
is being compared to.
This second change actually wasn't a lot of code because not
descending into directories was already the behavior for
ignored directories. This just extends that to all directories.
|
|
b6c93aef
|
2012-02-21T14:46:24
|
|
Uniform iterators for trees, index, and workdir
This create a new git_iterator type of object that provides a
uniform interface for iterating over the index, an arbitrary
tree, or the working directory of a repository.
As part of this, git ignore support was extended to support
push and pop of directory-based ignore files as the working
directory is being traversed (so the array of ignores does
not have to be recreated at each directory during traveral).
There are a number of other small utility functions in buffer,
path, vector, and fileops that are included in this patch
that made the iterator implementation cleaner.
|