Merge branch 'bw/read-blob-data-does-not-modify-index-state'

Code clean-up.

* bw/read-blob-data-does-not-modify-index-state:
  index: improve constness for reading blob data
This commit is contained in:
Junio C Hamano
2017-01-23 15:59:19 -08:00
2 changed files with 3 additions and 2 deletions

View File

@ -598,7 +598,7 @@ extern int chmod_index_entry(struct index_state *, struct cache_entry *ce, char
extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b); extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b);
extern void set_object_name_for_intent_to_add_entry(struct cache_entry *ce); extern void set_object_name_for_intent_to_add_entry(struct cache_entry *ce);
extern int index_name_is_other(const struct index_state *, const char *, int); extern int index_name_is_other(const struct index_state *, const char *, int);
extern void *read_blob_data_from_index(struct index_state *, const char *, unsigned long *); extern void *read_blob_data_from_index(const struct index_state *, const char *, unsigned long *);
/* do stat comparison even if CE_VALID is true */ /* do stat comparison even if CE_VALID is true */
#define CE_MATCH_IGNORE_VALID 01 #define CE_MATCH_IGNORE_VALID 01

View File

@ -2285,7 +2285,8 @@ int index_name_is_other(const struct index_state *istate, const char *name,
return 1; return 1;
} }
void *read_blob_data_from_index(struct index_state *istate, const char *path, unsigned long *size) void *read_blob_data_from_index(const struct index_state *istate,
const char *path, unsigned long *size)
{ {
int pos, len; int pos, len;
unsigned long sz; unsigned long sz;