Thread (1 message) 1 message, 1 author, 2016-06-15

Re: What's cooking in git.git (Jan 2012, #08; Tue, 31)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:54

Junio C Hamano [off-list ref] writes:
And of course the culprit turns out to be that "cute" expression.

-- >8 --
Subject: gitweb: do not use assignment with regexp replace in parameter

A recent patch made the code to generate a parameter to git_get_projects_list
a bit too cute, by introducing a new variable, assigning a value to it, and
then munging that value with s/// replacement, all in the parameter list.

The whole expression returns the number of replacements, not the resulting
value in the variable after s/// operation.

Split them into separate expressions, which also would make the resulting
lines shorter and less taxing on the brain. 

Signed-off-by: Junio C Hamano <redacted>
I've squashed this in to the offending commit and merged the result to the
'next' branch.

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