git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC/PATCH 1/2] status -s: respect the status.relativePaths option

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Nov 26, 2009, 15:24 UTC
Message-ID
<62c5bb36940485deefbf73f4bdc3fd45bbea069e.1259248243.git.git@drmicha.warpmail.net>
In-Reply-To
<cover.1259248243.git.git@drmicha.warpmail.net>

so that 'status' and 'status -s' in a subdir produce the same file names.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
Anything else would be highly surprising. Note that the porcelain case
is unchanged, of course.
 builtin-commit.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/builtin-commit.c b/builtin-commit.c
index 7f888fe..c103beb 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -1113,6 +1113,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:
-- 
1.6.6.rc0.274.g71380
Previous: Michael J GruberNext: Junio C Hamano
Message 2 of 14 in “status -s: Use the same config as status”
  1. 0/2 status -s: Use the same config as statusMichael J Gruber, Nov 26, 2009
  2. 1/2 status -s: respect the status.relativePaths optionMichael J Gruber, Nov 26, 2009
  3. Junio C HamanoNov 27, 2009
  4. Jeff KingNov 27, 2009
  5. 2/2 status -s: obey color.statusMichael J Gruber, Nov 26, 2009
  6. Johannes SixtNov 26, 2009
  7. Michael J GruberNov 26, 2009
  8. Junio C HamanoNov 26, 2009
  9. Add a notice that only certain functions can print color escape codesJohannes Sixt, Nov 27, 2009
  10. Junio C HamanoNov 27, 2009
  11. Johannes SixtNov 27, 2009
  12. Michael J GruberNov 27, 2009
  13. Junio C HamanoNov 27, 2009
  14. Michael J GruberNov 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.