Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-03 21:01:27 +0300
committerJunio C Hamano <gitster@pobox.com>2015-08-03 21:01:27 +0300
commitd939af12bd96db7ad3e671a0585ad8570aa7e9d3 (patch)
tree5772ac1192ed299db657ffcfbc71c318521db653 /strbuf.h
parent980a3d3dd742d534b394b04e578c2de5e3ee4793 (diff)
parente4f031e34b08e3217c10942e682920a6939308a0 (diff)
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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index 4a48c0031a..aef2794651 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -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,