From: Junio C Hamano Date: Tue, 19 Jun 2007 01:37:35 GMT Subject: Re: [PATCH/RFC] config: Add --null/-z option for null-delimted output Message-ID: <7v645kyba8.fsf@assigned-by-dhcp.pobox.com> In-Reply-To: Johannes Schindelin writes: > As for the FIXME: If you have a config like this: > > [core] > Some = where > over > the = core.rainbow > > git-config -z would output something like this: > > core.some\0where\0core.over\0core.the\0core.rainbow\0 > > Right? > > As you can see, it is quite hard for a parser to find out what is key, and > what is value. That FIXME is _exactly_ about this dilemma. > > IIRC I stated once that -z should output a value of "true" for these > cases, since they only make sense as booleans. But AFAIR nothing > conclusive came out of that thread. I do not remember the thread, but I think that may make sense. "over = 1", "over = true" etc. cannot be canonicalized to "true" without knowing core.over is boolean, but core.over by itself without any assignment cannot be anything but a boolean. Another possibility, though, is to say: core.some\0where\0core.over\0\0core.the\0core.rainbow\0