Re: [RFC/PATCH 2/3] add a library of code for producing structured output

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

 



Julian Phillips <julian@xxxxxxxxxxxxxxxxx> writes:
> On Sun, 11 Apr 2010 11:16:18 -0700, Junio C Hamano <gitster@xxxxxxxxx>
> wrote:
>> Julian Phillips <julian@xxxxxxxxxxxxxxxxx> writes:
>> 
>>> Add a library that allows commands to produce structured output in any
>>> of a range of formats using a single API.
>>>
>>> The API includes an OPT_OUTPUT and handle_output_arg so that the
>>> option handling for different commands will be as similar as possible.
>> 
>> I was hoping that the existing low-level -z routines (e.g. "diff-* -z")
>> follow similar enough patterns to have a corresponding output-z.c and be
>> handled inside output.c library.  But that is not a requirement, just
>> "would have been nicer if the original were written that way".
> 
> As the API currently stands, I don't think it would be possible to
> recreate the existing output of -z, as the separator between values is not
> constant.  I haven't really looked into whether the output is completely
> incompatible with structured output though (i.e. could -z be supported by
> adding one or two functions to the API?).

What about the new(ly) proposed -Z output in one of its variants,
namely with single NUL ("\0") as field separator, and double NUL ("\0\0")
as a record terminator?

-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
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]