From: Eric Sunshine Date: Sun, 15 May 2016 06:45:49 GMT Subject: Re: [PATCH v1 2/3] read-cache: factor out get_sha1_from_index() helper Message-ID: In-Reply-To: <1463294297-20215-1-git-send-email-tboegi@web.de> On Sun, May 15, 2016 at 2:38 AM, wrote: > 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 > --- > 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+/ /