var: run setup_git_directory_gently() sooner
Part of a campaign to make repository-local configuration available early (simplifying the startup sequence for built-in commands). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
f0ef6a6eff
commit
2bc8c1a8a6
@ -74,14 +74,9 @@ static int show_config(const char *var, const char *value, void *cb)
|
||||
|
||||
int cmd_var(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
const char *val;
|
||||
int nongit;
|
||||
if (argc != 2) {
|
||||
const char *val = NULL;
|
||||
if (argc != 2)
|
||||
usage(var_usage);
|
||||
}
|
||||
|
||||
setup_git_directory_gently(&nongit);
|
||||
val = NULL;
|
||||
|
||||
if (strcmp(argv[1], "-l") == 0) {
|
||||
git_config(show_config, NULL);
|
||||
|
Reference in New Issue
Block a user