Skip to content

Commit

Permalink
Fix parsing of status.showUntrackedFiles
Browse files Browse the repository at this point in the history
status.showUntrackedFiles is incorrecly parsed as a boolean. According
to git-config(1), possible values are `no`, `normal` and `all`.

Fixes #1219
  • Loading branch information
koutcher committed Aug 18, 2022
1 parent f83b2de commit 17ee531
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,8 @@ read_repo_config_option(char *name, size_t namelen, char *value, size_t valuelen
parse_bool(&opt_diff_noprefix, value);

else if (!strcmp(name, "status.showuntrackedfiles"))
parse_bool(&opt_status_show_untracked_files, value);
opt_status_show_untracked_files = !!strcmp(value, "no"),
opt_status_show_untracked_dirs = !strcmp(value, "all");

else if (!prefixcmp(name, "tig.color."))
set_repo_config_option(name + 10, value, option_color_command);
Expand Down

0 comments on commit 17ee531

Please sign in to comment.