diff --git a/builtin-commit.c b/builtin-commit.c index 09d2840..40e5805 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -396,7 +396,8 @@ static void determine_author_info(void) name = xstrndup(a + 8, lb - (a + 8)); email = xstrndup(lb + 2, rb - (lb + 2)); - date = xstrndup(rb + 2, eol - (rb + 2)); + if (!date) + date = xstrndup(rb + 2, eol - (rb + 2)); } if (force_author) {