summaryrefslogtreecommitdiff
path: root/src/path.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-09-30 16:58:33 -0700
committerRussell Belfer <rb@github.com>2013-10-03 10:44:13 -0700
commit2fe54afa2a8f87d03d2d550dcde7718f27e40967 (patch)
tree262b9bcbe9ccf920f84ee1e7aa8d51d352850ead /src/path.h
parent6b7991e264b2fb0448e3dc47f972bafabf38c1fa (diff)
downloadlibgit2-2fe54afa2a8f87d03d2d550dcde7718f27e40967.tar.gz
Put hooks in place for precompose in dirload fn
This doesn't actual do string precompose but it puts the hooks in place into the iterators and the git_path_dirload function so that the actual precompose work is ready to go.
Diffstat (limited to 'src/path.h')
-rw-r--r--src/path.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/path.h b/src/path.h
index b2899e97f..feacc99d0 100644
--- a/src/path.h
+++ b/src/path.h
@@ -290,6 +290,11 @@ extern int git_path_walk_up(
int (*fn)(void *state, git_buf *),
void *state);
+enum {
+ GIT_PATH_DIRLOAD_IGNORE_CASE = (1u << 0),
+ GIT_PATH_DIRLOAD_PRECOMPOSE_UNICODE = (1u << 1),
+};
+
/**
* Load all directory entries (except '.' and '..') into a vector.
*
@@ -310,6 +315,7 @@ extern int git_path_dirload(
const char *path,
size_t prefix_len,
size_t alloc_extra,
+ unsigned int flags,
git_vector *contents);
@@ -336,7 +342,7 @@ extern int git_path_with_stat_cmp_icase(const void *a, const void *b);
*
* @param path The directory to read from
* @param prefix_len The trailing part of path to prefix to entry paths
- * @param ignore_case How to sort and compare paths with start/end limits
+ * @param flags GIT_PATH_DIRLOAD flags from above
* @param start_stat As optimization, only stat values after this prefix
* @param end_stat As optimization, only stat values before this prefix
* @param contents Vector to fill with git_path_with_stat structures
@@ -344,7 +350,7 @@ extern int git_path_with_stat_cmp_icase(const void *a, const void *b);
extern int git_path_dirload_with_stat(
const char *path,
size_t prefix_len,
- bool ignore_case,
+ unsigned int flags,
const char *start_stat,
const char *end_stat,
git_vector *contents);