builtin/add.c: clean up die() messages

As described in the CodingGuidelines document, a single line message given to die() and its friends should not capitalize its first word, and should not add full-stop at the end. Signed-off-by: Naomi Ibe <naomi.ibeh69@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Naomi Ibe committed Oct 17, 2023 at 12:39 UTC 48399e9cf0348060fc03df794dab587eaf14cc6e
1 file changed +5 -5
builtin/add.c
+5 -5
@@ -182,7 +182,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
182 git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
183
184 if (repo_read_index(the_repository) < 0)
185 - die(_("Could not read the index"));
185 + die(_("could not read the index"));
186
187 repo_init_revisions(the_repository, &rev, prefix);
188 rev.diffopt.context = 7;
@@ -201,15 +201,15 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
201 die(_("editing patch failed"));
202
203 if (stat(file, &st))
204 - die_errno(_("Could not stat '%s'"), file);
204 + die_errno(_("could not stat '%s'"), file);
205 if (!st.st_size)
206 - die(_("Empty patch. Aborted."));
206 + die(_("empty patch. aborted"));
207
208 child.git_cmd = 1;
209 strvec_pushl(&child.args, "apply", "--recount", "--cached", file,
210 NULL);
211 if (run_command(&child))
212 - die(_("Could not apply '%s'"), file);
212 + die(_("could not apply '%s'"), file);
213
214 unlink(file);
215 free(file);
@@ -567,7 +567,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
567 finish:
568 if (write_locked_index(&the_index, &lock_file,
569 COMMIT_LOCK | SKIP_IF_UNCHANGED))
570 - die(_("Unable to write new index file"));
570 + die(_("unable to write new index file"));
571
572 dir_clear(&dir);
573 clear_pathspec(&pathspec);