Re: [RFC] Git config file reader in Perl (WIP)

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

 



Johannes Schindelin wrote:
> 
> On Wed, 17 Jan 2007, Jakub Narebski wrote:
> 
>> No key or value can contain "\n".
> 
> I just tried this:
> 
> 	$ cat > .git/config << EOF
> 	[section] key = "Hello\nWorld"
> 	EOF
> 	$ git-repo-config -l
> 	section.key=Hello
> 	World
> 
> So, values _can_ contain newlines.

Sorry, my mistake. I haven't noticed that your previous example
the error was "\w", not embedded newlines, and that embedded newlines
work.
 
>> With "\n" as separator you can simply rrturn NUL in the noval case.
> 
> Which would buy you what exactly? You can tell that the user did not say 
> "noval = true", but "noval". Great. But the _effect_ should be the same!
> 
> Anyway, I realize you don't like my solution, so I will just shut up.

I like your solution.

The only ambiguity is how to deal with '[section] noval' case. You
propose to treat it as if it was '[section] noval = true' for --dump,
and not as if it was '[section] noval = ' or '[section] noval = ""'.
Good. But this _has_ to be explained in documentation.

That said, I still think that having alternate parser for a format
is a good idea. Otherwise it is not a format, but "something that
parser parses".

BTW. it looks like C escape sequences are parsed, but not octal
escape sequences, nor no-op escaping other character.

-- 
Jakub Narebski
Poland
-
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]