Re: [PATCH 2/2] catfile.c: add --batch-command mode
From: Phillip Wood <hidden>
Date: 2022-02-04 16:47:00
From: Phillip Wood <hidden>
Date: 2022-02-04 16:47:00
Hi John On 04/02/2022 04:11, John Cai wrote:
Hi Junio, thanks for the review! [...]quoted
So, from that point of view, begin <cmd> <parameter> <parameter> ... end may be a better design, no?Good point. Now I'm wondering if we can simplify where commands get queued up and a "get" will execute them along with an implicit flush. <cmd> <parameter> <cmd> <parameter> <cmd> <parameter> get
I think that would be an improvement (I'd suggest calling "get" "flush" instead), the begin ... get <cmd> sequence seems unnecessarily complex compared the the RFC of this series. If the user gives --buffer on the command line then we can buffer the input until we see a "flush" command and if the user does not give --buffer on the command line then we should flush the output after each command. Best Wishes Phillip