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

[RFC/ PATCH 3/5] unpack_trees_options: update porcelain messages

From
DGDiane Gasselin <diane.gasselin@ensimag.imag.fr>
Date
Jun 9, 2010, 12:44 UTC
Message-ID
<1276087446-25112-5-git-send-email-diane.gasselin@ensimag.imag.fr>
In-Reply-To
<1276087446-25112-4-git-send-email-diane.gasselin@ensimag.imag.fr>
From: Diane <diane.gasselin@ensimag.imag.fr>
Update porcelain messages of unpack_trees_options in order to have a good layout.
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
---
 builtin/checkout.c |    2 +-
 merge-recursive.c  |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 88b1f43..9b2dca6 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -372,7 +372,7 @@ static int merge_working_tree(struct checkout_opts *opts,
 		topts.src_index = &the_index;
 		topts.dst_index = &the_index;
 
-		topts.msgs.not_uptodate_file = "You have local changes to '%s'; cannot switch branches.";
+		topts.msgs.not_uptodate_file = "You have local changes to:\n%scannot switch branches.";
 
 		refresh_cache(REFRESH_QUIET);
 
diff --git a/merge-recursive.c b/merge-recursive.c
index 206c103..62c07ab 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1182,19 +1182,19 @@ struct unpack_trees_error_msgs get_porcelain_error_msgs(void)
 {
 	struct unpack_trees_error_msgs msgs = {
 		/* would_overwrite */
-		"Your local changes to '%s' would be overwritten by merge.  Aborting.",
+		"Your local changes to the files:\n%swould be overwritten by merge.",
 		/* not_uptodate_file */
-		"Your local changes to '%s' would be overwritten by merge.  Aborting.",
+		"Your local changes to the files:\n%swould be overwritten by merge.",
 		/* not_uptodate_dir */
-		"Updating '%s' would lose untracked files in it.  Aborting.",
+		"Updating the directories:\n%swould lose untracked files in it.",
 		/* would_lose_untracked */
-		"Untracked working tree file '%s' would be %s by merge.  Aborting",
+		"Untracked working tree files:\n%swould be %s by merge.",
 		/* bind_overlap -- will not happen here */
 		NULL,
 	};
 	if (advice_commit_before_merge) {
 		msgs.would_overwrite = msgs.not_uptodate_file =
-			"Your local changes to '%s' would be overwritten by merge.  Aborting.\n"
+			"Your local changes to the files:\n%swould be overwritten by merge.\n"
 			"Please, commit your changes or stash them before you can merge.";
 	}
 	return msgs;
-- 
1.6.6.7.ga5fe3
Previous: Diane GasselinNext: Diane Gasselin
Message 5 of 21 in “unpack_trees: nicer error messages”
  1. 0/5 unpack_trees: nicer error messagesDiane Gasselin, Jun 9, 2010
  2. 0/5 unpack_trees: nicer error messagesDiane Gasselin, Jun 9, 2010
  3. 1/5 tree-walk: do not stop when an error is detectedDiane Gasselin, Jun 9, 2010
  4. 2/5 unpack_trees: group errors by typeDiane Gasselin, Jun 9, 2010
  5. 3/5 unpack_trees_options: update porcelain messagesDiane Gasselin, Jun 9, 2010
  6. 4/5 t3030: update porcelain expected messageDiane Gasselin, Jun 9, 2010
  7. 5/5 t7609: test merge and checkout error messagesDiane Gasselin, Jun 9, 2010
  8. Matthieu MoyJun 9, 2010
  9. Diane GasselinJun 9, 2010
  10. Matthieu MoyJun 9, 2010
  11. Junio C HamanoJun 9, 2010
  12. Matthieu MoyJun 9, 2010
  13. Jeff KingJun 10, 2010
  14. Diane GasselinJun 10, 2010
  15. Diane GasselinJun 9, 2010
  16. Junio C HamanoJun 9, 2010
  17. Diane GasselinJun 10, 2010
  18. Matthieu MoyJun 9, 2010
  19. Junio C HamanoJun 9, 2010
  20. Diane GasselinJun 9, 2010
  21. Matthieu MoyJun 9, 2010

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.