From: Phillip Wood Date: Fri, 04 Feb 2022 16:46:54 GMT Subject: Re: [PATCH 2/2] catfile.c: add --batch-command mode Message-ID: <767d5f5a-8395-78bc-865f-a39acc39e061@gmail.com> In-Reply-To: <74E01F50-D5B4-41F0-A6F0-BBCA462ED74A@gmail.com> Hi John On 04/02/2022 04:11, John Cai wrote: > Hi Junio, thanks for the review! > [...] >> So, from that point of view, >> >> begin >> >> >> ... >> 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. > > > > > get I think that would be an improvement (I'd suggest calling "get" "flush" instead), the begin ... get 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