Re: [PATCH 1/2] commit: loosen ident checks when generating template
From: Eric Sunshine <hidden>
Date: 2016-06-15 23:03:16
On Wed, Dec 10, 2014 at 10:42 AM, Jeff King [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Jeff King <redacted> ---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//
+ * 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