From: Junio C Hamano Date: Thu, 16 Feb 2012 21:59:53 +0000 (-0800) Subject: Merge branch 'jx/i18n-more-marking' into maint X-Git-Tag: v1.7.9.2~28 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e6d88ca87cbb3d89d639a3ee769486f44f9a33b8?ds=inline;hp=-c Merge branch 'jx/i18n-more-marking' into maint * jx/i18n-more-marking: i18n: format_tracking_info "Your branch is behind" message i18n: git-commit whence_s "merge/cherry-pick" message --- e6d88ca87cbb3d89d639a3ee769486f44f9a33b8 diff --combined builtin/commit.c index 2deccb5444,470b4a4e8c..eae5a29aeb --- a/builtin/commit.c +++ b/builtin/commit.c @@@ -196,16 -196,16 +196,16 @@@ static void determine_whence(struct wt_ static const char *whence_s(void) { - char *s = ""; + const char *s = ""; switch (whence) { case FROM_COMMIT: break; case FROM_MERGE: - s = "merge"; + s = _("merge"); break; case FROM_CHERRY_PICK: - s = "cherry-pick"; + s = _("cherry-pick"); break; } @@@ -543,7 -543,6 +543,7 @@@ static void determine_author_info(struc if (author_message) { const char *a, *lb, *rb, *eol; + size_t len; a = strstr(author_message_buffer, "\nauthor "); if (!a) @@@ -564,11 -563,6 +564,11 @@@ (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) {