]> git.proxmox.com Git - libgit2.git/commit - tests/libgit2/diff/diff_helpers.h
Uniform iterators for trees, index, and workdir
authorRussell Belfer <arrbee@arrbee.com>
Tue, 21 Feb 2012 22:46:24 +0000 (14:46 -0800)
committerRussell Belfer <arrbee@arrbee.com>
Tue, 21 Feb 2012 22:46:24 +0000 (14:46 -0800)
commitb6c93aef4276051f9c4536ecbed48f4cd093bd1b
treea15962c672890c0c8cc021dafa7d29487f81c75a
parent9c94a356cc61daa85e17c6342db9b3d62f788802
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.
17 files changed:
src/attr.c
src/attr.h
src/buffer.c
src/buffer.h
src/fileops.c
src/fileops.h
src/ignore.c
src/ignore.h
src/iterator.c [new file with mode: 0644]
src/iterator.h [new file with mode: 0644]
src/path.c
src/path.h
src/vector.c
src/vector.h
tests-clar/diff/diff_helpers.c [new file with mode: 0644]
tests-clar/diff/diff_helpers.h [new file with mode: 0644]
tests-clar/diff/iterator.c [new file with mode: 0644]