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

Re: [PATCH/WIP v3 1/4] for-each-ref: extract helper functions out of grab_single_ref()

From
Karthik Nayak <karthik.188@gmail.com>
Date
May 28, 2015, 20:33 UTC
Message-ID
<55677B7D.3060209@gmail.com>
In-Reply-To
<vpqr3q0o3yr.fsf@anie.imag.fr>
On 05/29/2015 01:43 AM, Matthieu Moy wrote:
Show 6 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> This is a preperatory patch for restructuring 'for-each-ref' and
>> evntually moving most of it to 'ref-filter' to provide the
>
> s/evntually/eventually/
Noted.
Show 20 quoted lines
>
> The patch looks much nicer now.
>
>> -	int cnt;
>> [...]
>> +	REALLOC_ARRAY(cb->grab_array, cb->grab_cnt + 1);
>> +	cb->grab_array[cb->grab_cnt++] = ref;
>>
>> -	cnt = cb->grab_cnt;
>> -	REALLOC_ARRAY(cb->grab_array, cnt + 1);
>> -	cb->grab_array[cnt++] = ref;
>> -	cb->grab_cnt = cnt;
>
> This hunk is not advertized in the commit message, and I had to fight a
> bit to understand what it does with "we're extracting helper functions"
> in mind. It would have been much easier to review in a separate patch
> entitled "for-each-ref: simplify code" for example.
>
> But I agree that your version is simpler indeed.
>
Will put it in a separate patch. Thanks for the review.
-- 
Regards,
Karthik
Previous: Matthieu MoyNext: Karthik Nayak
Message 4 of 15 in “for-each-ref: re-structure code for moving to 'ref-filter'”
  1. 1/4 for-each-ref: re-structure code for moving to 'ref-filter'Karthik Nayak, May 28, 2015
  2. 1/4 for-each-ref: extract helper functions out of grab_single_ref()Karthik Nayak, May 28, 2015
  3. Matthieu MoyMay 28, 2015
  4. Karthik NayakMay 28, 2015
  5. 2/4 for-each-ref: introduce new structures for better organisationKarthik Nayak, May 28, 2015
  6. Matthieu MoyMay 28, 2015
  7. Karthik NayakMay 28, 2015
  8. Matthieu MoyMay 28, 2015
  9. Karthik NayakMay 28, 2015
  10. Junio C HamanoMay 28, 2015
  11. Junio C HamanoMay 28, 2015
  12. 3/4 for-each-ref: rename some functions and make them publicKarthik Nayak, May 28, 2015
  13. 4/4 ref-filter: move code from 'for-each-ref'Karthik Nayak, May 28, 2015
  14. Matthieu MoyMay 28, 2015
  15. Karthik NayakMay 28, 2015

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.