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

[PATCH v2 3/3] Capitalization and punctuation fixes to some user visible messages

From
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Date
Apr 28, 2023, 12:56 UTC
Message-ID
<20230428125649.1719796-3-oswald.buddenhagen@gmx.de>
In-Reply-To
<20230428125649.1719796-1-oswald.buddenhagen@gmx.de>
These are conscious violations of the usual rules for error messages,
based on this reasoning:
- If an error message is directly followed by another sentence, it needs
  to be properly terminated with a period, lest the grammar looks broken
  and becomes hard to read.
- That second sentence isn't actually an error message any more, so it
  should abide to conventional language rules for good looks and
  legibility. Arguably, these should be converted to advice messages
  (which the user can squelch, too), but that's a much bigger effort to
  get right.
- Neither of these apply to the first hunk in do_exec(), but this
  two-line message looks just too much like a real sentence to not
  terminate it. Also, leaving it alone would make it asymmetrical to
  the other hunk.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>
---
v2:
- tried to make commit message more convincing
- put it last in the series, to make the less controversial changes
  easier to apply
---
 builtin/pull.c | 2 +-
 sequencer.c    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/pull.c b/builtin/pull.c
index 56f679d94a..bb2ddc93ab 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -1044,7 +1044,7 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
 		if (!opt_autostash)
 			require_clean_work_tree(the_repository,
 				N_("pull with rebase"),
-				_("please commit or stash them."), 1, 0);
+				_("Please commit or stash them."), 1, 0);
 
 		if (get_rebase_fork_point(&rebase_fork_point, repo, *refspecs))
 			oidclr(&rebase_fork_point);
diff --git a/sequencer.c b/sequencer.c
index 0677c9ab09..21748bbfb0 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -3629,13 +3629,13 @@ static int do_exec(struct repository *r, const char *command_line)
 			  "\n"),
 			command_line,
 			dirty ? _("and made changes to the index and/or the "
-				"working tree\n") : "");
+				"working tree.\n") : "");
 		if (status == 127)
 			/* command not found */
 			status = 1;
 	} else if (dirty) {
 		warning(_("execution succeeded: %s\nbut "
-			  "left changes to the index and/or the working tree\n"
+			  "left changes to the index and/or the working tree.\n"
 			  "Commit or stash your changes, and then run\n"
 			  "\n"
 			  "  git rebase --continue\n"
-- 
2.40.0.152.g15d061e6df
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 21 in “Capitalization and punctuation fixes to some user visible messages”
  1. 1/3 Capitalization and punctuation fixes to some user visible messagesOswald Buddenhagen, Mar 23, 2023
  2. 3/3 advice: translate all actions in error_resolve_conflict()Oswald Buddenhagen, Mar 23, 2023
  3. Junio C HamanoMar 24, 2023
  4. 2/3 sequencer: actually translate report in do_exec()Oswald Buddenhagen, Mar 23, 2023
  5. Junio C HamanoMar 23, 2023
  6. Oswald BuddenhagenMar 23, 2023
  7. Junio C HamanoMar 23, 2023
  8. Oswald BuddenhagenMar 23, 2023
  9. Junio C HamanoMar 23, 2023
  10. Oswald BuddenhagenMar 23, 2023
  11. 1/3 advice: handle "rebase" in error_resolve_conflict()Oswald Buddenhagen, Apr 28, 2023
  12. 2/3 sequencer: actually translate report in do_exec()Oswald Buddenhagen, Apr 28, 2023
  13. Junio C HamanoApr 28, 2023
  14. 3/3 Capitalization and punctuation fixes to some user visible messagesOswald Buddenhagen, Apr 28, 2023
  15. Junio C HamanoApr 28, 2023
  16. Junio C HamanoApr 28, 2023
  17. Junio C HamanoApr 28, 2023
  18. Oswald BuddenhagenApr 29, 2023
  19. Junio C HamanoApr 30, 2023
  20. advice: handle "rebase" in error_resolve_conflict()Oswald Buddenhagen, Aug 7, 2023
  21. Junio C HamanoAug 7, 2023

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.