diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-02-13 11:42:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-02-13 11:42:15 -0800 |
commit | 87cb3b82a42613dc3ffd1eddf95f8c306a045ad1 (patch) | |
tree | 056bc067a0f6de58609373179d1795df07821627 /builtin | |
parent | 5a62b531ae1fda10d023082cb73a5440dbd54df1 (diff) | |
parent | 2c733fb24c10a9d7aacc51f956bf9b7881980870 (diff) | |
download | git-87cb3b82a42613dc3ffd1eddf95f8c306a045ad1.tar.gz |
Merge branch 'jc/parse-date-raw' into maint
* jc/parse-date-raw:
parse_date(): '@' prefix forces git-timestamp
parse_date(): allow ancient git-timestamp
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/commit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index eba1377eb3..2deccb5444 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -543,6 +543,7 @@ static void determine_author_info(struct strbuf *author_ident) if (author_message) { const char *a, *lb, *rb, *eol; + size_t len; a = strstr(author_message_buffer, "\nauthor "); if (!a) @@ -563,6 +564,11 @@ static void determine_author_info(struct strbuf *author_ident) (a + strlen("\nauthor ")))); email = xmemdupz(lb + strlen("<"), rb - (lb + strlen("<"))); date = xmemdupz(rb + strlen("> "), eol - (rb + strlen("> "))); + len = eol - (rb + strlen("> ")); + date = xmalloc(len + 2); + *date = '@'; + memcpy(date + 1, rb + strlen("> "), len); + date[len + 1] = '\0'; } if (force_author) { |