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

[PATCH] Make filenames line up in git-status output

From
APAndy Parkins <andyparkins@gmail.com>
Date
Oct 26, 2006, 14:17 UTC
Message-ID
<200610261517.24468.andyparkins@gmail.com>

When all the filenames line up it's much easier to copy and paste them somewhere else, or to remove the "modified:", "copied:", etc prefix.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
 wt-status.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 4b74e68..3952809 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -72,25 +72,25 @@ static void wt_status_print_filepair(int
 	color_printf(color(WT_STATUS_HEADER), "#\t");
 	switch (p->status) {
 	case DIFF_STATUS_ADDED:
-		color_printf(c, "new file: %s", p->one->path); break;
+		color_printf(c, "new file:   %s", p->one->path); break;
 	case DIFF_STATUS_COPIED:
-		color_printf(c, "copied: %s -> %s",
+		color_printf(c, "copied:     %s -> %s",
 				p->one->path, p->two->path);
 		break;
 	case DIFF_STATUS_DELETED:
-		color_printf(c, "deleted: %s", p->one->path); break;
+		color_printf(c, "deleted:    %s", p->one->path); break;
 	case DIFF_STATUS_MODIFIED:
-		color_printf(c, "modified: %s", p->one->path); break;
+		color_printf(c, "modified:   %s", p->one->path); break;
 	case DIFF_STATUS_RENAMED:
-		color_printf(c, "renamed: %s -> %s",
+		color_printf(c, "renamed:    %s -> %s",
 				p->one->path, p->two->path);
 		break;
 	case DIFF_STATUS_TYPE_CHANGED:
 		color_printf(c, "typechange: %s", p->one->path); break;
 	case DIFF_STATUS_UNKNOWN:
-		color_printf(c, "unknown: %s", p->one->path); break;
+		color_printf(c, "unknown:    %s", p->one->path); break;
 	case DIFF_STATUS_UNMERGED:
-		color_printf(c, "unmerged: %s", p->one->path); break;
+		color_printf(c, "unmerged:   %s", p->one->path); break;
 	default:
 		die("bug: unhandled diff status %c", p->status);
 	}
-- 
1.4.3.3.g5bca6
Message 1 of 1 in “Make filenames line up in git-status output”
  1. Make filenames line up in git-status outputAndy Parkins, Oct 26, 2006

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.