summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2013-06-02 17:46:52 +0200
committerJunio C Hamano <gitster@pobox.com>2013-06-02 15:31:12 -0700
commit21a6b9fa4212277d925b789795e83ac96c2aaa01 (patch)
treece71028921602d98ae03f1f02e2958bab5797a01 /cache.h
parent20d142b48c8f2f50662db095e193836d0a8f5ad1 (diff)
downloadgit-21a6b9fa4212277d925b789795e83ac96c2aaa01.tar.gz
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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 43a27e7b33..01e8760ecf 100644
--- a/cache.h
+++ b/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 */