Thread (10 messages) 10 messages, 5 authors, 2016-06-15

Re: [PATCH/RFC] config: Add --null/-z option for null-delimted output

flat view

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:43:17

Johannes Schindelin wrote:
On Tue, 19 Jun 2007, Frank Lichtenheld wrote:
quoted
On Mon, Jun 18, 2007 at 06:37:35PM -0700, Junio C Hamano wrote:
quoted
quoted
Another possibility, though, is to say:

	core.some\0where\0core.over\0\0core.the\0core.rainbow\0
How do you denote empty values then?

[section]
	key=
	key

this are two very different statements atm (e.g. the one is false and
the other one is true).

I still think using two different delimiters is the simplest choice.
Okay, good point. But of course, you have to use a delimiter for the key 
name that cannot be part of the keyname. You picked '\n'. The original was 
'='. Both work.
If I remember correctly (and what I checked to be true), while '=' cannot
be part of keyname nor section name, it can be part of subsection name,
therefore it can be part of fuly qualified key name.

The '\n' can _not_ be part of subsection name, therefore it can not be
part of fully qualified key name.

  $ cat > conftest <<EOF
  [section "sub=section"]
       truekey=true
       emptykey=
       novalkey
  EOF

  $ GIT_CONFIG=conftest git-config -l
  section.sub=section.truekey=true
  section.sub=section.emptykey=
  section.sub=section.novalkey

-- 
Jakub Narebski
Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help