summaryrefslogtreecommitdiff
path: root/test-date.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-05-02 13:51:35 -0700
committerJunio C Hamano <gitster@pobox.com>2012-05-02 13:51:35 -0700
commit1be65eda6a7018445ebdd9cfec4b1caab4db34ba (patch)
tree948dffe3ecb2baa0667b61bae3312232235f9011 /test-date.c
parenta3db8511b79c1a169c70caf07cedf21358101c60 (diff)
parent4470ef94973cf40bb83864d480cee1e064053879 (diff)
downloadgit-1be65eda6a7018445ebdd9cfec4b1caab4db34ba.tar.gz
Merge branch 'nd/i18n'
More message strings marked for i18n. By Nguyễn Thái Ngọc Duy (10) and Jonathan Nieder (1) * nd/i18n: help: replace underlining "help -a" headers using hyphens with a blank line i18n: bundle: mark strings for translation i18n: index-pack: mark strings for translation i18n: apply: update say_patch_name to give translators complete sentence i18n: apply: mark strings for translation i18n: remote: mark strings for translation i18n: make warn_dangling_symref() automatically append \n i18n: help: mark strings for translation i18n: mark relative dates for translation strbuf: convenience format functions with \n automatically appended Makefile: feed all header files to xgettext
Diffstat (limited to 'test-date.c')
-rw-r--r--test-date.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test-date.c b/test-date.c
index 6bcd5b03c0..10afaabbfa 100644
--- a/test-date.c
+++ b/test-date.c
@@ -7,13 +7,14 @@ static const char *usage_msg = "\n"
static void show_dates(char **argv, struct timeval *now)
{
- char buf[128];
+ struct strbuf buf = STRBUF_INIT;
for (; *argv; argv++) {
time_t t = atoi(*argv);
- show_date_relative(t, 0, now, buf, sizeof(buf));
- printf("%s -> %s\n", *argv, buf);
+ show_date_relative(t, 0, now, &buf);
+ printf("%s -> %s\n", *argv, buf.buf);
}
+ strbuf_release(&buf);
}
static void parse_dates(char **argv, struct timeval *now)