summaryrefslogtreecommitdiff
path: root/t/t5402-post-merge-hook.sh
diff options
context:
space:
mode:
authorLibravatar Jakub Narebski <jnareb@gmail.com>2007-11-03 00:41:19 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-11-02 18:27:35 -0700
commitb201927ac8a4544baa067f5c5c7c7f2d6780e29a (patch)
tree6adde74a16da13501b2fbe13ce6b51acdebc0524 /t/t5402-post-merge-hook.sh
parentgitweb: Add tests for overriding gitweb config with repo config (diff)
downloadtgif-b201927ac8a4544baa067f5c5c7c7f2d6780e29a.tar.xz
gitweb: Read repo config using 'git config -z -l'
Change git_get_project_config to run git-config only once per repository, without changing its signature (its calling convention). This means for example that it returns 'true' or 'false' when called with second argument '--bool', and not true or false value. Instead of calling 'git config [<type>] --get gitweb.<key>' once for each config variable, call 'git config -z -l' only once, parsing and saving its output to %config variable. This makes possible to add new per repository configuration without paying cost of forking once per variable checked. We can now allow repository description and repository URLs to be stored in config file without badly affecting gitweb performance. For now only configuration variables for 'gitweb' section are stored. Multiple values for single configuration variable are stored as anonymous array reference; configuration variable with no value is stored as undef. Converting configuration variable values to boolean or integer value are done in Perl. Results differ from git-config in the fact that no conversion error is ever raised. For boolean values no value, 'true' (any case) and 'false' (any case) are considered true, numbers are true if not zero; all other values (even invalid for bool) are considered false. For integer values value suffix of 'k', 'm', or 'g' following decimal number will cause the value to be multiplied by 1024, 1048576, or 1073741824; other values are returned as-is, only whitespace stripped. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5402-post-merge-hook.sh')
0 files changed, 0 insertions, 0 deletions