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

RE: [PATCH v3 0/8] refactor the filter process code into a reusable module

From
Ben Peart <ben.peart@microsoft.com>
Date
Mar 30, 2017, 15:26 UTC
Message-ID
<BL2PR03MB3239451B27A74171F20AF0DF4340@BL2PR03MB323.namprd03.prod.outlook.com>
In-Reply-To
<xmqqr31fam77.fsf@gitster.mtv.corp.google.com>
Show 36 quoted lines
> From: Junio C Hamano [mailto:gitster@pobox.com]
> 
> Ben Peart <peartben@gmail.com> writes:
> 
> > Ben Peart (8):
> >   pkt-line: add packet_writel() and packet_read_line_gently()
> >   convert: Update convert to use new packet_writel() function
> >   convert: Split start_multi_file_filter into two separate functions
> >   convert: Separate generic structures and variables from the filter
> >     specific ones
> >   convert: Update generic functions to only use generic data structures
> >   convert: rename reusable sub-process functions
> >   sub-process: move sub-process functions into separate files
> >   convert: Update subprocess_read_status to not die on EOF
> 
> This presentation is much easier to digest, compared to the large ball of wax
> we saw previously.  It highlights the key modification that cmd2process is
> now "subclassed" from subprocess_entry which is a more generic structure
> by embedding the latter at the beginning, and have its user
> start_multi_file_filter_fn() explicitly downcast the latter to the former around
> patches 4/8 and 5/8.
> 
> If I were doing this series, I would organize the first two slightly differently,
> namely:
> 
>  * 1/8 just adds packet_read_line_gently().
> 
>  * 2/8 moves packet_write_line() from convert.c to pkt-line.c while
>    renaming it, with the justification that this function must be
>    made more widely available.  It would naturally involves
>    adjusting existing callers.
> 
> because write and read done in your 1/8 are independent and orthogonal
> changes, and doing it that way also avoids needless temporary duplication of
> the same function.
> 
I'll go ahead and do it that way.
 
> I may later have further comments on 3-8/8 after giving them another read,
> but I haven't seen anything questionable in them so far.
> 
> Thanks.
Previous: Junio C Hamano
Message 13 of 13 in “refactor the filter process code into a reusable module”
  1. 0/8 refactor the filter process code into a reusable moduleBen Peart, Mar 29, 2017
  2. 2/8 convert: Update convert to use new packet_writel() functionBen Peart, Mar 29, 2017
  3. 1/8 pkt-line: add packet_writel() and packet_read_line_gently()Ben Peart, Mar 29, 2017
  4. 3/8 convert: Split start_multi_file_filter into two separate functionsBen Peart, Mar 29, 2017
  5. 6/8 convert: rename reusable sub-process functionsBen Peart, Mar 29, 2017
  6. 7/8 sub-process: move sub-process functions into separate filesBen Peart, Mar 29, 2017
  7. Junio C HamanoMar 29, 2017
  8. Ben PeartMar 30, 2017
  9. 8/8 convert: Update subprocess_read_status to not die on EOFBen Peart, Mar 29, 2017
  10. 4/8 convert: Separate generic structures and variables from the filter specific onesBen Peart, Mar 29, 2017
  11. 5/8 convert: Update generic functions to only use generic data structuresBen Peart, Mar 29, 2017
  12. Junio C HamanoMar 29, 2017
  13. Ben PeartMar 30, 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.