summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2013-08-03 11:51:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-08-07 15:36:58 (GMT)
commit21e047dcadaffc09cfc958e9014e84bf2237bfe8 (patch)
tree89e4a1cf1e0514dadad25880e61e55b21c8ec3bb /unpack-trees.c
parentc83e8c1768b1dbce98a3161aec175a42858d4795 (diff)
downloadgit-21e047dcadaffc09cfc958e9014e84bf2237bfe8.zip
git-21e047dcadaffc09cfc958e9014e84bf2237bfe8.tar.gz
git-21e047dcadaffc09cfc958e9014e84bf2237bfe8.tar.bz2
config parsing options: allow one flag multiple times
This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27). This commit introduces a change for the users, after this patch you can pass one of the config level flags multiple times: Before: $ git config --global --global --list error: only one config file at a time. usage: ... Afterwards this will work. This is due to the following check in the code: if (use_global_config + use_system_config + use_local_config + !!given_config_file + !!given_config_blob > 1) { error("only one config file at a time."); usage_with_options(builtin_config_usage, builtin_config_options); } With OPT_BOOL instead of OPT_BOOLEAN the variables use_global_config, use_system_config, use_local_config will only have the value 0 if the command line option was not passed or 1 no matter how often the respective command line option was passed. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.c')
0 files changed, 0 insertions, 0 deletions