aboutsummaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius@trolltech.com>2008-06-05 14:47:50 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-09 15:48:20 -0700
commitd6293d1f2cadcdf45f8ada7847a32b51fa5bf0a6 (patch)
tree0173edac951e656f2c407980f3b31241a17a92d0 /wt-status.c
parent6c2ce048bbfc6fbc2bdd86a3e586cb8881eb2dc2 (diff)
downloadgit-d6293d1f2cadcdf45f8ada7847a32b51fa5bf0a6.tar.gz
git-d6293d1f2cadcdf45f8ada7847a32b51fa5bf0a6.tar.xz
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>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/wt-status.c b/wt-status.c
index 23017e4d4..28c9e637e 100644
--- a/wt-status.c
+++ b/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);
}