Re: [PATCH v2 1/3] Add public function read_blob_data_from_index_path()

2013-04-14 Thread Lukas Fleischer
On Sat, Apr 13, 2013 at 10:49:36PM -0700, Junio C Hamano wrote: > Thanks. I'll queue with the following API fix-up on this, with > obvious adjustments necessary for the later ones. > > * read_blob_data_from_index() is descriptive enough. If you read a >blob from the index, you would ask for i

Re: [PATCH v2 1/3] Add public function read_blob_data_from_index_path()

2013-04-13 Thread Junio C Hamano
Junio C Hamano writes: > diff --git a/attr.c b/attr.c > index a668a63..46bde57 100644 > --- a/attr.c > +++ b/attr.c > @@ -387,7 +387,7 @@ static struct attr_stack *read_attr_from_index(const char > *path, int macro_ok) > char *buf, *sp; > int lineno = 0; > > - buf = read_blob_d

Re: [PATCH v2 1/3] Add public function read_blob_data_from_index_path()

2013-04-13 Thread Junio C Hamano
Thanks. I'll queue with the following API fix-up on this, with obvious adjustments necessary for the later ones. * read_blob_data_from_index() is descriptive enough. If you read a blob from the index, you would ask for it with a path; there is no other sensible key to do so. * A function

[PATCH v2 1/3] Add public function read_blob_data_from_index_path()

2013-04-13 Thread Lukas Fleischer
* Make the read_index_data() function public, rename it to read_blob_data_from_index_path() and move it from attr.c to read-cache.c. * Add a use_index parameter to specify a custom index_state since we are no longer enable to access the static use_index variable from attr.c. This allows for