summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2007-12-07 16:26:07 -0500
committerJunio C Hamano <gitster@pobox.com>2007-12-08 03:33:24 -0800
commit46f721c8fee9f1c027f96e2bf987ce6e7d05ab94 (patch)
treecc538c99132ea4dad626b5b26e7fb576d72b38c0 /wt-status.c
parentc3ce3261281d00bcdd59907e76f421034ccb1261 (diff)
downloadgit-46f721c8fee9f1c027f96e2bf987ce6e7d05ab94.tar.gz
add status.relativePaths config variable
The output of git-status was recently changed to output relative paths. Setting this variable to false restores the old behavior for any old-timers that prefer it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wt-status.c b/wt-status.c
index 05414bb9e9..51c1879691 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -8,6 +8,7 @@
#include "revision.h"
#include "diffcore.h"
+int wt_status_relative_paths = 1;
int wt_status_use_color = 0;
static char wt_status_colors[][COLOR_MAXLEN] = {
"", /* WT_STATUS_HEADER: normal */
@@ -400,6 +401,11 @@ int git_status_config(const char *k, const char *v)
if (!prefixcmp(k, "status.color.") || !prefixcmp(k, "color.status.")) {
int slot = parse_status_slot(k, 13);
color_parse(v, k, wt_status_colors[slot]);
+ return 0;
+ }
+ if (!strcmp(k, "status.relativepaths")) {
+ wt_status_relative_paths = git_config_bool(k, v);
+ return 0;
}
return git_default_config(k, v);
}