summaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-07-07 01:14:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-07 01:14:47 (GMT)
commit6ba649e4085bd7b8c80fd2080ca003bf450c9f53 (patch)
treeae506d2c343a66ce4192d4587219acd59006e797 /strbuf.c
parenteb37527ab0b6e9ff1cbd01aa20a4dd6aa4150a96 (diff)
parent3b702239d6399685aa69539b83be5f744cfa10e3 (diff)
downloadgit-6ba649e4085bd7b8c80fd2080ca003bf450c9f53.zip
git-6ba649e4085bd7b8c80fd2080ca003bf450c9f53.tar.gz
git-6ba649e4085bd7b8c80fd2080ca003bf450c9f53.tar.bz2
Merge branch 'ab/strbuf-addftime-tzname-boolify'
strbuf_addftime() is further getting tweaked. * ab/strbuf-addftime-tzname-boolify: strbuf: change an always NULL/"" strbuf_addftime() param to bool strbuf.h comment: discuss strbuf_addftime() arguments in order
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/strbuf.c b/strbuf.c
index c4e91a6..89d22e3 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -779,7 +779,7 @@ char *xstrfmt(const char *fmt, ...)
}
void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
- int tz_offset, const char *tz_name)
+ int tz_offset, int suppress_tz_name)
{
struct strbuf munged_fmt = STRBUF_INIT;
size_t hint = 128;
@@ -808,8 +808,7 @@ void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
fmt++;
break;
case 'Z':
- if (tz_name) {
- strbuf_addstr(&munged_fmt, tz_name);
+ if (suppress_tz_name) {
fmt++;
break;
}