From: Junio C Hamano <gitster@pobox.com>
To: Naomi Ibe <naomi.ibeh69@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/1] [OUTREACHY] Fixed add.c file to conform to guidelines when using die() listed in issue #635
Date: Mon, 09 Oct 2023 11:49:17 -0700 [thread overview]
Message-ID: <xmqqlecbzl5e.fsf@gitster.g> (raw)
In-Reply-To: <20231009011546.509-1-naomi.ibeh69@gmail.com> (Naomi Ibe's message of "Mon, 9 Oct 2023 02:15:45 +0100")
Naomi Ibe <naomi.ibeh69@gmail.com> writes:
> Subject: Re: [PATCH 1/1] [OUTREACHY] Fixed add.c file to conform to guidelines when using d
Subject: [OUTREACHY][PATCH 1/1] builtin/add.c: clean up die() messages
> From: Naomi <naomi.ibeh69@gmail.com>
The name and address on this line come from your commit object,
which in turn would have came from your configuration. You have
[user]
name = Naomi
email = naomi.ibeh69@gmail.com
somewhere in your configuration file, perhaps in $HOME/.gitconfig or
somewhere. When contributiong to this project, you want that "name"
line to also include your family name, as it should match what you
write on your Signed-off-by: line. A focused way to do so without
affecting your author identity for other projects is to add
[user]
name = Naomi Ibe
in .git/config of the repository that you use to contribute to this
project, e.g.,
$ cd ... to the working tree of your clone of git you work in ...
$ git config user.name "Naomi Ibe"
The space above your Sign off is to fill the details you omitted on
the title of the message (which would say something about "conform
to guidelines" or "clean up" without mentioning what rule the
original violates), making the whole thing something like:
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: ...
> Signed-off-by: Naomi Ibe <naomi.ibeh69@gmail.com>
> ---
> builtin/add.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Thanks. Otherwise the patch looks good.
>
> diff --git a/builtin/add.c b/builtin/add.c
> index c27254a5cd..5126d2ede3 100644
> --- a/builtin/add.c
> +++ b/builtin/add.c
> @@ -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 */
>
> 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);
> rev.diffopt.context = 7;
> @@ -200,15 +200,15 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
> die(_("editing patch failed"));
>
> if (stat(file, &st))
> - die_errno(_("Could not stat '%s'"), file);
> + die_errno(_("could not stat '%s'"), file);
> if (!st.st_size)
> - die(_("Empty patch. Aborted."));
> + die(_("empty patch. aborted"));
>
> child.git_cmd = 1;
> strvec_pushl(&child.args, "apply", "--recount", "--cached", file,
> NULL);
> if (run_command(&child))
> - die(_("Could not apply '%s'"), file);
> + die(_("could not apply '%s'"), file);
>
> unlink(file);
> free(file);
> @@ -568,7 +568,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
> finish:
> if (write_locked_index(&the_index, &lock_file,
> COMMIT_LOCK | SKIP_IF_UNCHANGED))
> - die(_("Unable to write new index file"));
> + die(_("unable to write new index file"));
>
> dir_clear(&dir);
> clear_pathspec(&pathspec);
next prev parent reply other threads:[~2023-10-09 18:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 1:15 [PATCH 1/1] [OUTREACHY] Fixed add.c file to conform to guidelines when using die() listed in issue #635 Naomi Ibe
2023-10-09 18:49 ` Junio C Hamano [this message]
2023-10-10 15:19 ` Naomi Ibe
2023-10-10 19:22 ` Christian Couder
2023-10-10 22:24 ` Junio C Hamano
2023-10-11 5:50 ` Naomi Ibe
2023-10-11 6:17 ` Dragan Simic
-- strict thread matches above, loose matches on Subject: below --
2023-10-09 1:16 Naomi Ibe
2023-10-09 7:27 ` Christian Couder
2023-10-09 7:57 ` Naomi Ibe
2023-10-09 8:22 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqlecbzl5e.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=naomi.ibeh69@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).