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>
This commit is contained in:

committed by
Junio C Hamano

parent
43c8a30d15
commit
48399e9cf0
@ -182,7 +182,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
|
|||||||
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
|
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
|
||||||
|
|
||||||
if (repo_read_index(the_repository) < 0)
|
if (repo_read_index(the_repository) < 0)
|
||||||
die(_("Could not read the index"));
|
die(_("could not read the index"));
|
||||||
|
|
||||||
repo_init_revisions(the_repository, &rev, prefix);
|
repo_init_revisions(the_repository, &rev, prefix);
|
||||||
rev.diffopt.context = 7;
|
rev.diffopt.context = 7;
|
||||||
@ -201,15 +201,15 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
|
|||||||
die(_("editing patch failed"));
|
die(_("editing patch failed"));
|
||||||
|
|
||||||
if (stat(file, &st))
|
if (stat(file, &st))
|
||||||
die_errno(_("Could not stat '%s'"), file);
|
die_errno(_("could not stat '%s'"), file);
|
||||||
if (!st.st_size)
|
if (!st.st_size)
|
||||||
die(_("Empty patch. Aborted."));
|
die(_("empty patch. aborted"));
|
||||||
|
|
||||||
child.git_cmd = 1;
|
child.git_cmd = 1;
|
||||||
strvec_pushl(&child.args, "apply", "--recount", "--cached", file,
|
strvec_pushl(&child.args, "apply", "--recount", "--cached", file,
|
||||||
NULL);
|
NULL);
|
||||||
if (run_command(&child))
|
if (run_command(&child))
|
||||||
die(_("Could not apply '%s'"), file);
|
die(_("could not apply '%s'"), file);
|
||||||
|
|
||||||
unlink(file);
|
unlink(file);
|
||||||
free(file);
|
free(file);
|
||||||
@ -567,7 +567,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
|||||||
finish:
|
finish:
|
||||||
if (write_locked_index(&the_index, &lock_file,
|
if (write_locked_index(&the_index, &lock_file,
|
||||||
COMMIT_LOCK | SKIP_IF_UNCHANGED))
|
COMMIT_LOCK | SKIP_IF_UNCHANGED))
|
||||||
die(_("Unable to write new index file"));
|
die(_("unable to write new index file"));
|
||||||
|
|
||||||
dir_clear(&dir);
|
dir_clear(&dir);
|
||||||
clear_pathspec(&pathspec);
|
clear_pathspec(&pathspec);
|
||||||
|
Reference in New Issue
Block a user