Skip to content

Commit 48399e9

Browse files
Amarajahgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 43c8a30 commit 48399e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

builtin/add.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
182182
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
183183

184184
if (repo_read_index(the_repository) < 0)
185-
die(_("Could not read the index"));
185+
die(_("could not read the index"));
186186

187187
repo_init_revisions(the_repository, &rev, prefix);
188188
rev.diffopt.context = 7;
@@ -201,15 +201,15 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
201201
die(_("editing patch failed"));
202202

203203
if (stat(file, &st))
204-
die_errno(_("Could not stat '%s'"), file);
204+
die_errno(_("could not stat '%s'"), file);
205205
if (!st.st_size)
206-
die(_("Empty patch. Aborted."));
206+
die(_("empty patch. aborted"));
207207

208208
child.git_cmd = 1;
209209
strvec_pushl(&child.args, "apply", "--recount", "--cached", file,
210210
NULL);
211211
if (run_command(&child))
212-
die(_("Could not apply '%s'"), file);
212+
die(_("could not apply '%s'"), file);
213213

214214
unlink(file);
215215
free(file);
@@ -567,7 +567,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
567567
finish:
568568
if (write_locked_index(&the_index, &lock_file,
569569
COMMIT_LOCK | SKIP_IF_UNCHANGED))
570-
die(_("Unable to write new index file"));
570+
die(_("unable to write new index file"));
571571

572572
dir_clear(&dir);
573573
clear_pathspec(&pathspec);

0 commit comments

Comments
 (0)