diff mbox series

[GSoC] builtin/clean.c: fix error message usage typo

Message ID 20230214032534.507628-1-cheskaqiqi@gmail.com (mailing list archive)
State New, archived
Headers show
Series [GSoC] builtin/clean.c: fix error message usage typo | expand

Commit Message

Shuqi Liang Feb. 14, 2023, 3:25 a.m. UTC
As Documentation/CodingGuidelines says, we shouldn't capitalize the first
word in error message. Change the capital letter to lowercase letter.

Signed-off-by: Shuqi Liang <cheskaqiqi@gmail.com>
---
 builtin/clean.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Junio C Hamano Feb. 14, 2023, 5:32 a.m. UTC | #1
Shuqi Liang <cheskaqiqi@gmail.com> writes:

> As Documentation/CodingGuidelines says, we shouldn't capitalize the first
> word in error message. Change the capital letter to lowercase letter.

I think the "do not caplitalize" rule is about the sentence after
"fatal:", "error:", "warning:", and "info:" labels.

> -static const char *msg_remove = N_("Removing %s\n");
> -static const char *msg_would_remove = N_("Would remove %s\n");
> -static const char *msg_skip_git_dir = N_("Skipping repository %s\n");
> -static const char *msg_would_skip_git_dir = N_("Would skip repository %s\n");
> -static const char *msg_skip_cwd = N_("Refusing to remove current working directory\n");
> -static const char *msg_would_skip_cwd = N_("Would refuse to remove current working directory\n");

Do any of these messages come after any of these labels?  I didn't
think so.

>  static const char *msg_warn_remove_failed = N_("failed to remove %s");
>  static const char *msg_warn_lstat_failed = N_("could not lstat %s\n");

These do appear after "warning:" and downcasing is very much
appropriate.

Thanks.
Shuqi Liang Feb. 14, 2023, 9:55 p.m. UTC | #2
Hi Junio

On Tue, Feb 14, 2023 at 12:32 AM Junio C Hamano <gitster@pobox.com> wrote:


> I think the "do not caplitalize" rule is about the sentence after
> "fatal:", "error:", "warning:", and "info:" labels.

Thanks, sorry for misunderstanding the "error message ". Will go and
find another that meets the requirements.
-------------------
Thanks


Shuqi
diff mbox series

Patch

diff --git a/builtin/clean.c b/builtin/clean.c
index b2701a2815..e6ce776001 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -30,14 +30,14 @@  static const char *const builtin_clean_usage[] = {
 	NULL
 };
 
-static const char *msg_remove = N_("Removing %s\n");
-static const char *msg_would_remove = N_("Would remove %s\n");
-static const char *msg_skip_git_dir = N_("Skipping repository %s\n");
-static const char *msg_would_skip_git_dir = N_("Would skip repository %s\n");
+static const char *msg_remove = N_("removing %s\n");
+static const char *msg_would_remove = N_("would remove %s\n");
+static const char *msg_skip_git_dir = N_("skipping repository %s\n");
+static const char *msg_would_skip_git_dir = N_("would skip repository %s\n");
 static const char *msg_warn_remove_failed = N_("failed to remove %s");
 static const char *msg_warn_lstat_failed = N_("could not lstat %s\n");
-static const char *msg_skip_cwd = N_("Refusing to remove current working directory\n");
-static const char *msg_would_skip_cwd = N_("Would refuse to remove current working directory\n");
+static const char *msg_skip_cwd = N_("refusing to remove current working directory\n");
+static const char *msg_would_skip_cwd = N_("would refuse to remove current working directory\n");
 
 enum color_clean {
 	CLEAN_COLOR_RESET = 0,