Thread (16 messages) flat view 16 messages, 4 authors, 2016-06-16

Re: [PATCH v1 2/3] read-cache: factor out get_sha1_from_index() helper

From: Eric Sunshine <hidden>
Date: 2016-06-16 02:19:23

On Sun, May 15, 2016 at 2:38 AM,  [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Factor out the retrieval of the sha1 for a given path in
read_blob_data_from_index() into the function get_sha1_from_index().

This will be used in the next commit, when convert.c can do the
analyze for "text=auto" without slurping the whole blob into memory
at once.

Add a wrapper definition get_sha1_from_cache().

Signed-off-by: Torsten Bögershausen <redacted>
---
diff --git a/cache.h b/cache.h
@@ -379,6 +379,7 @@ extern void free_name_hash(struct index_state *istate);
 #define read_blob_data_from_cache(path, sz) read_blob_data_from_index(&the_index, (path), (sz))
+#define get_sha1_from_cache(path)  get_sha1_from_index (&the_index, (path))
s/\s+/ /
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help