@matheusbsbs / matheus-bagliano / commits / 482a6c1061
Fork 0

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 <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael J Gruber committed Nov 26, 2009 at 16:24 UTC 482a6c106132bea454bf839f458c014f84ddbd99
2 files changed +4 -2
Documentation/git-status.txt
+2 -2
@@ -114,8 +114,8 @@ compatibility) and `color.status.<slot>` configuration variables
114 to colorize its output.
115
116 If the config variable `status.relativePaths` is set to false, then all
117 -paths shown in the long format are relative to the repository root, not
118 -to the current directory.
117 +paths shown are relative to the repository root, not to the current
118 +directory.
119
120 If `status.submodulesummary` is set to a non zero number or true (identical
121 to -1 or an unlimited number), the submodule summary will be enabled for
builtin-commit.c
+2
@@ -1059,6 +1059,8 @@ int cmd_status(int argc, const char **argv, const char *prefix)
1059
1060 switch (status_format) {
1061 case STATUS_FORMAT_SHORT:
1062 + if (s.relative_paths)
1063 + s.prefix = prefix;
1064 short_print(&s, null_termination);
1065 break;
1066 case STATUS_FORMAT_PORCELAIN: