From: Michael J Gruber Date: Thu, 26 Nov 2009 15:24:38 +0000 (+0100) Subject: status -s: respect the status.relativePaths option X-Git-Tag: v1.7.0-rc0~137^2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=482a6c106132bea454bf839f458c014f84ddbd99;p=git.git status -s: respect the status.relativePaths option Otherwise, 'status' and 'status -s' in a subdir would produce different names. This change is all the more important because status.relativePaths is on by default. Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt index 58d35fb3c..b3dfa42cc 100644 --- a/Documentation/git-status.txt +++ b/Documentation/git-status.txt @@ -114,8 +114,8 @@ compatibility) and `color.status.` configuration variables to colorize its output. If the config variable `status.relativePaths` is set to false, then all -paths shown in the long format are relative to the repository root, not -to the current directory. +paths shown are relative to the repository root, not to the current +directory. If `status.submodulesummary` is set to a non zero number or true (identical to -1 or an unlimited number), the submodule summary will be enabled for diff --git a/builtin-commit.c b/builtin-commit.c index f2fd0a458..f49b598cb 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -1059,6 +1059,8 @@ int cmd_status(int argc, const char **argv, const char *prefix) switch (status_format) { case STATUS_FORMAT_SHORT: + if (s.relative_paths) + s.prefix = prefix; short_print(&s, null_termination); break; case STATUS_FORMAT_PORCELAIN: