Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-02-22 02:46:24 +0400
committerRussell Belfer <arrbee@arrbee.com>2012-02-22 02:46:24 +0400
commitb6c93aef4276051f9c4536ecbed48f4cd093bd1b (patch)
treea15962c672890c0c8cc021dafa7d29487f81c75a /src/attr.h
parent9c94a356cc61daa85e17c6342db9b3d62f788802 (diff)
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/attr.h')
-rw-r--r--src/attr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/attr.h b/src/attr.h
index 6ae2e28dc..5dbbb2366 100644
--- a/src/attr.h
+++ b/src/attr.h
@@ -20,6 +20,13 @@ extern int git_attr_cache__init(git_repository *repo);
extern int git_attr_cache__insert_macro(
git_repository *repo, git_attr_rule *macro);
+extern int git_attr_cache__lookup_or_create_file(
+ git_repository *repo,
+ const char *key,
+ const char *filename,
+ int (*loader)(git_repository *, const char *, git_attr_file *),
+ git_attr_file **file_ptr);
+
extern int git_attr_cache__push_file(
git_repository *repo,
git_vector *stack,