Re: [PATCH] config: Add --quoted option to produce machine-parsable output

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] config: Add --quoted option to produce machine-parsable output

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:12

Johannes Schindelin [off-list ref] writes:
quoted
Git.pm could simply do:

	my $eval = `git config --perl --get-regexp 'gitcvs\..*'`;
	my $cfg = eval "$eval";

if you code your "perl" notation to produce:

	+{
		'gitcvs.ext.enabled' => 'false',
                'gitcvs.logfile' => '/var/log/gitcvs.log',
	}

in order to read things in.

Hmm?
IOW, something like 
http://article.gmane.org/gmane.comp.version-control.git/36922
Indeed (perhaps except fixing minor details like not hijacking
the variable name).  Care to resubmit with docs and tests?

Re: [PATCH] config: Add --quoted option to produce machine-parsable output

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:12

Hi,

On Mon, 21 May 2007, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
quoted
Git.pm could simply do:

	my $eval = `git config --perl --get-regexp 'gitcvs\..*'`;
	my $cfg = eval "$eval";

if you code your "perl" notation to produce:

	+{
		'gitcvs.ext.enabled' => 'false',
                'gitcvs.logfile' => '/var/log/gitcvs.log',
	}

in order to read things in.

Hmm?
IOW, something like 
http://article.gmane.org/gmane.comp.version-control.git/36922
Indeed (perhaps except fixing minor details like not hijacking
the variable name).  Care to resubmit with docs and tests?
Well, my version was not good, as Eric pointed out.

Do you want me to clean up Eric's version (according to my own comments, 
that is)?

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help