summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2009-11-26 16:24:38 +0100
committerJunio C Hamano <gitster@pobox.com>2009-11-26 19:15:57 -0800
commit482a6c106132bea454bf839f458c014f84ddbd99 (patch)
treec1cf24d8d06bb8b4818da82d81b39fcf88a87e57 /builtin-commit.c
parent46b77a6b487fceeeb297a9473631939aefd7e6fd (diff)
downloadgit-482a6c106132bea454bf839f458c014f84ddbd99.tar.gz
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>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index f2fd0a4580..f49b598cbd 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: