mirror of
https://github.com/git/git.git
synced 2024-11-27 12:03:55 +08:00
b316552339
index_dir_exists() returns a boolean to indicate if there is a case-insensitive match in the directory name-hash, but does not provide the caller with the exact spelling of that match. Create index_dir_find() to do the case-insensitive search *and* optionally return the spelling of the matched directory prefix in a provided strbuf. To avoid code duplication, convert index_dir_exists() to be a trivial wrapper around the new index_dir_find(). Signed-off-by: Jeff Hostetler <jeffhostetler@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
22 lines
746 B
C
22 lines
746 B
C
#ifndef NAME_HASH_H
|
|
#define NAME_HASH_H
|
|
|
|
struct cache_entry;
|
|
struct index_state;
|
|
|
|
|
|
int index_dir_find(struct index_state *istate, const char *name, int namelen,
|
|
struct strbuf *canonical_path);
|
|
|
|
#define index_dir_exists(i, n, l) index_dir_find((i), (n), (l), NULL)
|
|
|
|
void adjust_dirname_case(struct index_state *istate, char *name);
|
|
struct cache_entry *index_file_exists(struct index_state *istate, const char *name, int namelen, int igncase);
|
|
|
|
int test_lazy_init_name_hash(struct index_state *istate, int try_threaded);
|
|
void add_name_hash(struct index_state *istate, struct cache_entry *ce);
|
|
void remove_name_hash(struct index_state *istate, struct cache_entry *ce);
|
|
void free_name_hash(struct index_state *istate);
|
|
|
|
#endif /* NAME_HASH_H */
|