Add configuration option for default untracked files mode
By default, the untracked files mode for commit/status is 'normal' Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
This commit is contained in:

committed by
Junio C Hamano

parent
6c2ce048bb
commit
d6293d1f2c
13
wt-status.c
13
wt-status.c
@ -397,5 +397,18 @@ int git_status_config(const char *k, const char *v, void *cb)
|
||||
wt_status_relative_paths = git_config_bool(k, v);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(k, "status.showuntrackedfiles")) {
|
||||
if (!v)
|
||||
return config_error_nonbool(v);
|
||||
else if (!strcmp(v, "no"))
|
||||
show_untracked_files = SHOW_NO_UNTRACKED_FILES;
|
||||
else if (!strcmp(v, "normal"))
|
||||
show_untracked_files = SHOW_NORMAL_UNTRACKED_FILES;
|
||||
else if (!strcmp(v, "all"))
|
||||
show_untracked_files = SHOW_ALL_UNTRACKED_FILES;
|
||||
else
|
||||
return error("Invalid untracked files mode '%s'", v);
|
||||
return 0;
|
||||
}
|
||||
return git_color_default_config(k, v, cb);
|
||||
}
|
||||
|
Reference in New Issue
Block a user