diff options
author | Matthias Aßhauer <mha1993@live.de> | 2020-04-08 17:58:49 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-04-08 12:15:50 -0700 |
commit | a748f3f3dc0adff1d8a83dfc098ed819658998d0 (patch) | |
tree | 8f916fdb495b2d2e40c4741ef18d6a32d87f6c77 /Documentation/git-pull.txt | |
parent | Git 2.26 (diff) | |
download | tgif-a748f3f3dc0adff1d8a83dfc098ed819658998d0.tar.xz |
mingw: use modern strftime implementation if possible
Microsoft introduced a new "Universal C Runtime Library" (UCRT) with
Visual Studio 2015. The UCRT comes with a new strftime() implementation
that supports more date formats. We link git against the older
"Microsoft Visual C Runtime Library" (MSVCRT), so to use the UCRT
strftime() we need to load it from ucrtbase.dll using
DECLARE_PROC_ADDR()/INIT_PROC_ADDR().
Most supported Windows systems should have recieved the UCRT via Windows
update, but in some cases only MSVCRT might be available. In that case
we fall back to using that implementation.
With this change, it is possible to use e.g. the `%g` and `%V` date
format specifiers, e.g.
git show -s --format=%cd --date=format:‘%g.%V’ HEAD
Without this change, the user would see this error message on Windows:
fatal: invalid strftime format: '‘%g.%V’'
This fixes https://github.com/git-for-windows/git/issues/2495
Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-pull.txt')
0 files changed, 0 insertions, 0 deletions