Skip to content

Commit 8754250

Browse files
bmwillgitster
authored andcommitted
index: improve constness for reading blob data
Improve constness of the index_state parameter to the 'read_blob_data_from_index' function. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent d7dffce commit 8754250

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ extern int chmod_index_entry(struct index_state *, struct cache_entry *ce, char
599599
extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b);
600600
extern void set_object_name_for_intent_to_add_entry(struct cache_entry *ce);
601601
extern int index_name_is_other(const struct index_state *, const char *, int);
602-
extern void *read_blob_data_from_index(struct index_state *, const char *, unsigned long *);
602+
extern void *read_blob_data_from_index(const struct index_state *, const char *, unsigned long *);
603603

604604
/* do stat comparison even if CE_VALID is true */
605605
#define CE_MATCH_IGNORE_VALID 01

read-cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,8 @@ int index_name_is_other(const struct index_state *istate, const char *name,
22852285
return 1;
22862286
}
22872287

2288-
void *read_blob_data_from_index(struct index_state *istate, const char *path, unsigned long *size)
2288+
void *read_blob_data_from_index(const struct index_state *istate,
2289+
const char *path, unsigned long *size)
22892290
{
22902291
int pos, len;
22912292
unsigned long sz;

0 commit comments

Comments
 (0)