[PATCH 07/24] cache.h: drop read_blob_data_from_cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was done without cocinelle, as we only have 2 occurrences.

Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
---
 cache.h   | 1 -
 convert.c | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/cache.h b/cache.h
index 9b94339573..d078e88c3f 100644
--- a/cache.h
+++ b/cache.h
@@ -374,7 +374,6 @@ extern void free_name_hash(struct index_state *istate);
 #define resolve_undo_clear() resolve_undo_clear_index(&the_index)
 #define unmerge_cache_entry_at(at) unmerge_index_entry_at(&the_index, at)
 #define unmerge_cache(pathspec) unmerge_index(&the_index, pathspec)
-#define read_blob_data_from_cache(path, sz) read_blob_data_from_index(&the_index, (path), (sz))
 #endif
 
 enum object_type {
diff --git a/convert.c b/convert.c
index 8d652bf27c..cf29280ae1 100644
--- a/convert.c
+++ b/convert.c
@@ -137,7 +137,7 @@ const char *get_cached_convert_stats_ascii(const char *path)
 {
 	const char *ret;
 	unsigned long sz;
-	void *data = read_blob_data_from_cache(path, &sz);
+	void *data = read_blob_data_from_index(&the_index, path, &sz);
 	ret = gather_convert_stats_ascii(data, sz);
 	free(data);
 	return ret;
@@ -222,7 +222,7 @@ static int has_cr_in_index(const char *path)
 	void *data;
 	int has_cr;
 
-	data = read_blob_data_from_cache(path, &sz);
+	data = read_blob_data_from_index(&the_index, path, &sz);
 	if (!data)
 		return 0;
 	has_cr = memchr(data, '\r', sz) != NULL;
-- 
2.13.0.rc1.39.ga6db8bfa24





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]