diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:27 -0700 |
commit | d939af12bd96db7ad3e671a0585ad8570aa7e9d3 (patch) | |
tree | 5772ac1192ed299db657ffcfbc71c318521db653 /strbuf.h | |
parent | Merge branch 'pt/am-tests' (diff) | |
parent | strbuf: make strbuf_addftime more robust (diff) | |
download | tgif-d939af12bd96db7ad3e671a0585ad8570aa7e9d3.tar.xz |
Merge branch 'jk/date-mode-format'
Teach "git log" and friends a new "--date=format:..." option to
format timestamps using system's strftime(3).
* jk/date-mode-format:
strbuf: make strbuf_addftime more robust
introduce "format" date-mode
convert "enum date_mode" into a struct
show-branch: use DATE_RELATIVE instead of magic number
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, |