git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Stefan Beller <sbeller@google.com>
Date
May 2, 2017, 22:23 UTC
Message-ID
<20170502222322.21055-8-sbeller@google.com>
In-Reply-To
<20170502222322.21055-1-sbeller@google.com>
This was done without cocinelle, as we only have 2 occurrences.
Signed-off-by: Stefan Beller <sbeller@google.com>
---
 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
Previous: Stefan BellerNext: Stefan Beller
Message 7 of 25 in “Retire NO_THE_INDEX_COMPATIBILITY_MACROS”
  1. 00/24 Retire NO_THE_INDEX_COMPATIBILITY_MACROSStefan Beller, May 2, 2017
  2. 01/24 cache.h: drop read_cache()Stefan Beller, May 2, 2017
  3. 03/24 cache.h: drop read_cache_fromStefan Beller, May 2, 2017
  4. 02/24 cache.h: drop active_* macrosStefan Beller, May 2, 2017
  5. 06/24 unpack-trees.c: rename parameter 'the_index'Stefan Beller, May 2, 2017
  6. 04/24 cache.h: drop read_cache_preload(pathspec)Stefan Beller, May 2, 2017
  7. 07/24 cache.h: drop read_blob_data_from_cacheStefan Beller, May 2, 2017
  8. 05/24 cache.h: drop read_cache_unmerged()Stefan Beller, May 2, 2017
  9. 10/24 cache.h: drop cache_name_is_otherStefan Beller, May 2, 2017
  10. 12/24 cache.h: drop cache_dir_existsStefan Beller, May 2, 2017
  11. 11/24 cache.h: drop cache_file_existsStefan Beller, May 2, 2017
  12. 13/24 cache.h: drop is_cache_unborn(), discard_cache(), unmerged_cache()Stefan Beller, May 2, 2017
  13. 09/24 cache.h: drop resolve_undo_clearStefan Beller, May 2, 2017
  14. 08/24 cache.h: drop unmerge_cache[_entry_at]Stefan Beller, May 2, 2017
  15. 14/24 cache.h: drop cache_name_posStefan Beller, May 2, 2017
  16. 22/24 cache.h: drop ce_modifiedStefan Beller, May 2, 2017
  17. 20/24 cache.h: drop chmod_cache_entryStefan Beller, May 2, 2017
  18. 23/24 cache.h: drop ce_match_statStefan Beller, May 2, 2017
  19. 24/24 cache.h: retire NO_THE_INDEX_COMPATIBILITY_MACROSStefan Beller, May 2, 2017
  20. 21/24 cache.h: drop refresh_cacheStefan Beller, May 2, 2017
  21. 19/24 cache.h: drop add_file_to_cacheStefan Beller, May 2, 2017
  22. 18/24 cache.h: drop add_to_cacheStefan Beller, May 2, 2017
  23. 17/24 cache.h: drop remove_file_from_cacheStefan Beller, May 2, 2017
  24. 16/24 cache.h: drop rename_cache_entry_atStefan Beller, May 2, 2017
  25. 15/24 cache.h: drop add_cache_entryStefan Beller, May 2, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.