git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] commit: loosen ident checks when generating template

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Dec 11, 2014, 20:26 UTC
Message-ID
<CAPig+cTQBgDVoR-YG-WU_mJHR_NjdA6=5Lre_n4YMFawcSRwVw@mail.gmail.com>
In-Reply-To
<20141210154209.GA20771@peff.net>
On Wed, Dec 10, 2014 at 10:42 AM, Jeff King <peff@peff.net> wrote:
Show 14 quoted lines
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> diff --git a/builtin/commit.c b/builtin/commit.c
> index d1c90db..2be5506 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -822,8 +821,14 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
>                         status_printf_ln(s, GIT_COLOR_NORMAL,
>                                         "%s", only_include_assumed);
>
> -               split_ident_or_die(&ai, author_ident);
> -               split_ident_or_die(&ci, &committer_ident);
> +               /*
> +                * These should never fail because we they come from our own
s/we//
Show 11 quoted lines
> +                * fmt_ident. They may fail the sane_ident test, but we know
> +                * that the name and mail pointers will at least be valid,
> +                * which is enough for our tests and printing here.
> +                */
> +               assert_split_ident(&ai, author_ident);
> +               assert_split_ident(&ci, &committer_ident);
>
>                 if (ident_cmp(&ai, &ci))
>                         status_printf_ln(s, GIT_COLOR_NORMAL,
> --
> 2.2.0.454.g7eca6b7
Previous: Jeff KingNext: Jeff King
Message 4 of 7 in “Git commit amend empty emails”
  1. SimonDec 10, 2014
  2. Jeff KingDec 10, 2014
  3. 1/2 commit: loosen ident checks when generating templateJeff King, Dec 10, 2014
  4. Eric SunshineDec 11, 2014
  5. 2/2 commit: always populate GIT_AUTHOR_* variablesJeff King, Dec 10, 2014
  6. Junio C HamanoDec 10, 2014
  7. Jeff KingDec 10, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.