Merge branch 'bw/read-blob-data-does-not-modify-index-state'
authorJunio C Hamano <gitster@pobox.com>
Mon, 23 Jan 2017 23:59:19 +0000 (15:59 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Jan 2017 23:59:19 +0000 (15:59 -0800)
Code clean-up.

* bw/read-blob-data-does-not-modify-index-state:
index: improve constness for reading blob data

cache.h
read-cache.c
diff --git a/cache.h b/cache.h
index 40f7ddd24710b8d16d34fd00c9a0841fc346ec5c..00a029af3657d319b7df987a36979a519c2dda94 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -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 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 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 */
 #define CE_MATCH_IGNORE_VALID          01
index 2eca639cce3a084286418d56f2b48a4303c18dd7..7a9a7de91e6e84c429b0d485301c3500e404dd2f 100644 (file)
@@ -2285,7 +2285,8 @@ int index_name_is_other(const struct index_state *istate, const char *name,
        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;
        unsigned long sz;