read-cache: mark cache_entry pointers const
ie_match_stat and ie_modified only derefence their struct cache_entry pointers for reading. Add const to the parameter declaration here and do the same for the static helper function used by them, as it's the same there as well. This allows callers to pass in const pointers. Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
20d142b48c
commit
21a6b9fa42
4
cache.h
4
cache.h
@ -482,8 +482,8 @@ extern void *read_blob_data_from_index(struct index_state *, const char *, unsig
|
||||
#define CE_MATCH_RACY_IS_DIRTY 02
|
||||
/* do stat comparison even if CE_SKIP_WORKTREE is true */
|
||||
#define CE_MATCH_IGNORE_SKIP_WORKTREE 04
|
||||
extern int ie_match_stat(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
|
||||
extern int ie_modified(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
|
||||
extern int ie_match_stat(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
|
||||
extern int ie_modified(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
|
||||
|
||||
#define PATHSPEC_ONESTAR 1 /* the pathspec pattern sastisfies GFNM_ONESTAR */
|
||||
|
||||
|
Reference in New Issue
Block a user