summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-02-21 14:46:24 -0800
committerRussell Belfer <arrbee@arrbee.com>2012-02-21 14:46:24 -0800
commitb6c93aef4276051f9c4536ecbed48f4cd093bd1b (patch)
treea15962c672890c0c8cc021dafa7d29487f81c75a /src/buffer.h
parent9c94a356cc61daa85e17c6342db9b3d62f788802 (diff)
downloadlibgit2-b6c93aef4276051f9c4536ecbed48f4cd093bd1b.tar.gz
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.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 3a003ce3c..3969f461e 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -84,6 +84,7 @@ int git_buf_printf(git_buf *buf, const char *format, ...) GIT_FORMAT_PRINTF(2, 3
void git_buf_clear(git_buf *buf);
void git_buf_consume(git_buf *buf, const char *end);
void git_buf_truncate(git_buf *buf, ssize_t len);
+void git_buf_rtruncate_at_char(git_buf *path, char separator);
int git_buf_join_n(git_buf *buf, char separator, int nbuf, ...);
int git_buf_join(git_buf *buf, char separator, const char *str_a, const char *str_b);