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
This commit is contained in:
5
strbuf.h
5
strbuf.h
@ -344,6 +344,11 @@ extern void strbuf_commented_addf(struct strbuf *sb, const char *fmt, ...);
|
||||
__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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user