summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorSamuel Lijin <sxlijin@gmail.com>2017-05-18 04:21:53 -0400
committerJunio C Hamano <gitster@pobox.com>2017-05-22 12:14:13 +0900
commitbbf504a9957e8a2a262619641ffa30348d71a76f (patch)
treed9e0897c6250a60b6f2e72c71a8243c9a9653226 /dir.h
parentfb898888491b83c9a3396fb559032ca78807a0c0 (diff)
downloadgit-bbf504a9957e8a2a262619641ffa30348d71a76f.tar.gz
dir: expose cmp_name() and check_contains()
We want to use cmp_name() and check_contains() (which both compare `struct dir_entry`s, the former in terms of the sort order, the latter in terms of whether one lexically contains another) outside of dir.c, so we have to (1) change their linkage and (2) rename them as appropriate for the global namespace. The second is achieved by renaming cmp_name() to cmp_dir_entry() and check_contains() to check_dir_entry_contains(). Signed-off-by: Samuel Lijin <sxlijin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index 650e54bdf6..edb5fda586 100644
--- a/dir.h
+++ b/dir.h
@@ -327,6 +327,9 @@ static inline int dir_path_match(const struct dir_entry *ent,
has_trailing_dir);
}
+int cmp_dir_entry(const void *p1, const void *p2);
+int check_dir_entry_contains(const struct dir_entry *out, const struct dir_entry *in);
+
void untracked_cache_invalidate_path(struct index_state *, const char *);
void untracked_cache_remove_from_index(struct index_state *, const char *);
void untracked_cache_add_to_index(struct index_state *, const char *);