diff options
author | Jeff King <peff@peff.net> | 2015-06-25 12:55:45 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-29 11:39:10 -0700 |
commit | aa1462cc3d3b0c4c8ad6a60aaf31e0f3a424162d (patch) | |
tree | 59ef52faaddb398ce95f3564ea5bd895c69e047f /strbuf.h | |
parent | a5481a6c9438cbd9c246cfa59ff49c31a0926fb6 (diff) | |
download | git-aa1462cc3d3b0c4c8ad6a60aaf31e0f3a424162d.tar.gz |
introduce "format" date-mode
This feeds the format directly to strftime. Besides being a
little more flexible, the main advantage is that your system
strftime may know more about your locale's preferred format
(e.g., how to spell the days of the week).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -345,6 +345,11 @@ __attribute__((format (printf,2,0))) extern void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap); /** + * Add the time specified by `tm`, as formatted by `strftime`. + */ +extern void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm); + +/** * Read a given size of data from a FILE* pointer to the buffer. * * NOTE: The buffer is rewound if the read fails. If -1 is returned, |