Re: [GSoC RFC PATCH 0/5] repo-info: add new command for retrieving repository info

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

 



> Let's learn from our earlier mistakes and do it right in the
> new incarnation.

Ok, fair!

> 1. In text mode, the values are shown one-item-per-line, even if
>    the value has embedded LF in it.  At least we assume that the
>    values do not contain a NUL byte.
> 
> 2. If a value does not have LF or double-quote in it, it is output
>    literally.
> 
> 3. Otherwise, the value is shown with quote_c_style().

Hmmm, ok. So, I if I understood it correctly, is your idea to keep
the same functionality but using quote_c_style to keep one field
per line?

> The implication of which is that a loosely written program that does
> not grok funny values (namely, a string that contains a double-quote
> or a line-feed) can be written loosely without having to worry about
> quoting and assume one-line-per-item.  They may show a wrong value,
> but at least because one-line-per-item assumption holds, their
> input/request and value they receive from the program will not go
> out of sync.  And a more carefully written program can of course
> check the first byte to see if it is a double-quote, in which case
> they have to unquote the whole line (which may yield a multi-line
> value if the quoted string had embedded "\n"s).

Thanks again, Junio! 




[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]

  Powered by Linux