Re: [PATCH/RFC v2 1/4] fetch-pack: new --stdin option to read refs from stdin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28.03.2012 01:26, Junio C Hamano wrote:
Ivan Todoroski <grnch@xxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]