From: Ivan Todoroski Date: Tue, 27 Mar 2012 23:48:11 GMT Subject: Re: [PATCH/RFC v2 1/4] fetch-pack: new --stdin option to read refs from stdin Message-ID: <4F7251BB.5010406@gmx.net> In-Reply-To: <7vwr65y6b6.fsf@alter.siamese.dyndns.org> On 28.03.2012 01:26, Junio C Hamano wrote: > Ivan Todoroski writes: > >>> Curious. "stop at EOF", "trim" and "skip empty" imply that you are >>> catering to people who debug this from the terminal by typing (or copy >>> pasting). Is that the expected use case? >> The expected use case is people using this from shell scripts that >> could be getting refs by slicing and dicing output of other commands >> with regexps and what not > > That kind of use would not have leading or trailing whitespaces, and if > the target audience is scripts, I would prefer to force them to be > strict. Depends on how good the script writer is. :) But you're right, they can always change the script to tighten up what it generates. Also, I just checked what other commands with --stdin flags do (like rev-list, checkout-index, etc). They all expect an exact format like you said and they don't tolerate extra whitespace, making my patch the odd one out. It is important that similar flags behave consistently across different commands. Sorry for not checking for precedent before deciding to tolerate whitespace. I will tighten it up.