Fixed parameter parsing in repo_config() function

Jason A. Donenfeld Jason at zx2c4.com
Tue Oct 16 22:58:12 CEST 2012


> commit cdde90b04392946f63dde4ef41492bed4b2bb5da
> Author: Tobias Bieniek <Tobias.Bieniek at gmx.de>
> Date:   Wed Apr 18 12:32:13 2012 +0200
>     Fixed parameter parsing in repo_config() function
>
>     This makes it possible to activate the enable_commit_graph,
>     enable_log_filecount and enable_log_linecount for individual
>     repositories, even if the global setting is "0" (default).


This commit seems totally reasonable. The thing is, that awkward
multiplication was in there explicitly, so I wanted to figure out if
Lars was thinking about something we are not. The affected code was
copy and pasted around lots of places, so I took some time to play the
"git blame" game on different reference points. I eventually tracked
it back to this commit:

> commit e189344a7dfe6fa1b07434d5170e6441dcbaf788
> Author: Lars Hjemli <hjemli at gmail.com>
> Date:   Fri May 18 13:55:52 2007 +0200
>     Add knobs to enable/disable files/lines changed in log view
>
>     These columns can cause lots of IO on the server, so add settings to
>     explicitly enable them. Also, add per repo settings to optionally disable
>     the columns if sitewide enabled.
>
>     While at it, do not allow repo.snapshot to enable snapshots if the global
>     setting is disabled.


The intended usage here is to "add per repo settings to optionally
disable the columns if sidewide enabled". This is the opposite of "add
sidewide setting to optionally disable the columns if per repo
enabled". Multiplication does both. Only the first property is
desired. Therefore, I'm going to merge this.

Reasoning seem solid?

Jason




More information about the CGit mailing list