diff options
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c index 48d87e83ed..8c27ed2c66 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1896,7 +1896,7 @@ 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) +void *read_blob_data_from_index(struct index_state *istate, const char *path, unsigned long *size) { int pos, len; unsigned long sz; @@ -1925,5 +1925,7 @@ void *read_blob_data_from_index(struct index_state *istate, const char *path) free(data); return NULL; } + if (size) + *size = sz; return data; } |