Re: [GSoC PATCH v5 1/5] repo: declare the repo command

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

 



On Thu, Jul 24, 2025 at 09:06:57AM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@xxxxxx> writes:
> > I'm not really too sure whether we need to bother with quoting. The
> > LF-separated output shouldn't ever be used in a script, so I don't mind
> > too much whether it always works. But I guess it wouldn't be hard either
> > to just have something like:
> >
> >     if (uses_newline)
> >         quote_c_style(...);
> >
> > So with that in mind it's probably better to just do the right thing.
> 
> The right thing being...?  Use <LF> as a record separator to avoid
> forcing <NUL> on possible human readers, and adopt quoting in a rare
> case where <LF>s or <NUL>s need to be in the payload?  Or something
> else?

Use <LF> by default to help humans, but do C-style quoting in that case.
Provide <NUL> terminated output format for machines so that they don't
have to care about unquoting.

Patrick




[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