diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-07-06 18:14:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-06 18:14:47 -0700 |
commit | 6ba649e4085bd7b8c80fd2080ca003bf450c9f53 (patch) | |
tree | ae506d2c343a66ce4192d4587219acd59006e797 /strbuf.c | |
parent | eb37527ab0b6e9ff1cbd01aa20a4dd6aa4150a96 (diff) | |
parent | 3b702239d6399685aa69539b83be5f744cfa10e3 (diff) | |
download | git-6ba649e4085bd7b8c80fd2080ca003bf450c9f53.tar.gz |
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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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; } |