aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2020-11-30 19:30:06 -0500
committerJunio C Hamano <gitster@pobox.com>2020-12-01 13:05:37 -0800
commit4f6460df55cdccdda9d2a0aad4c6b578c007e01a (patch)
tree3e7e9d45b4c8e4e27b3f2841213a7b68f45c1719 /commit-graph.c
parentNinth batch (diff)
downloadgit-4f6460df55cdccdda9d2a0aad4c6b578c007e01a.tar.gz
git-4f6460df55cdccdda9d2a0aad4c6b578c007e01a.zip
builtin/bugreport.c: use thread-safe localtime_r()
To generate its filename, the 'git bugreport' builtin asks the system for the current time with 'localtime()'. Since this uses a shared buffer, it is not thread-safe. Even though 'git bugreport' is not multi-threaded, using localtime() can trigger some static analysis tools to complain, and a quick $ git grep -oh 'localtime\(_.\)\?' -- **/*.c | sort | uniq -c shows that the only usage of the thread-unsafe 'localtime' is in a piece of documentation. So, convert this instance to use the thread-safe version for consistency, and to appease some analysis tools. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions