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>
This commit is contained in:
Michael J Gruber
2009-11-26 16:24:38 +01:00
committed by Junio C Hamano
parent 46b77a6b48
commit 482a6c1061
2 changed files with 4 additions and 2 deletions

View File

@ -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: