Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> --- cache.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/cache.h b/cache.h index 26632065a5..acc639d6e0 100644 --- a/cache.h +++ b/cache.h @@ -605,13 +605,20 @@ extern int remove_index_entry_at(struct index_state *, int pos); extern void remove_marked_cache_entries(struct index_state *istate); extern int remove_file_from_index(struct index_state *, const char *path); -#define ADD_CACHE_VERBOSE 1 -#define ADD_CACHE_PRETEND 2 -#define ADD_CACHE_IGNORE_ERRORS 4 -#define ADD_CACHE_IGNORE_REMOVAL 8 -#define ADD_CACHE_INTENT 16 + +#define ADD_CACHE_VERBOSE 1 /* verbose */ +#define ADD_CACHE_PRETEND 2 /* dry run */ +#define ADD_CACHE_IGNORE_ERRORS 4 /* ignore errors */ +#define ADD_CACHE_IGNORE_REMOVAL 8 /* do not remove files from index */ +#define ADD_CACHE_INTENT 16 /* intend to add later; stage empty file */ +/* + * Adds the given path the index, respecting the repsitory configuration, e.g. + * in case insensitive file systems, the path is normalized. + */ extern int add_to_index(struct index_state *, const char *path, struct stat *, int flags); +/* stat the file then call add_to_index */ extern int add_file_to_index(struct index_state *, const char *path, int flags); + extern struct cache_entry *make_cache_entry(unsigned int mode, const unsigned char *sha1, const char *path, int stage, unsigned int refresh_options); extern int chmod_index_entry(struct index_state *, struct cache_entry *ce, char flip); extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b); -- 2.11.0.299.g762782ba8a