Re: [PATCH 1/2] commit: loosen ident checks when generating template
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
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