aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-10 14:08:12 -0800
committerJunio C Hamano <gitster@pobox.com>2012-02-10 14:08:12 -0800
commit3d8bc74127bbb583bc437214a1d6c9afcf77646c (patch)
tree6d1788c66ea9e038252cf6641b5c580c641dcb88 /builtin
parentfd6abd0c65b38897da64ef883ed1934d2b2b1a3a (diff)
parent2c733fb24c10a9d7aacc51f956bf9b7881980870 (diff)
downloadgit-3d8bc74127bbb583bc437214a1d6c9afcf77646c.tar.gz
git-3d8bc74127bbb583bc437214a1d6c9afcf77646c.tar.xz
Merge branch 'jc/parse-date-raw'
* 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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 470b4a4e8..eae5a29ae 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) {