diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-04-16 14:50:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-16 14:50:29 -0700 |
commit | 107313eb11931a66ec4cd3f83bd6c260f296ad19 (patch) | |
tree | efa63d47735cf17e1cc93e60c0f5985caad0b89d /builtin | |
parent | 2d642afb0a469c0c344f23bc715ea70b6a2dcade (diff) | |
parent | 9720d23e8caf4adee44b3a32803a9bb0480118bd (diff) | |
download | git-107313eb11931a66ec4cd3f83bd6c260f296ad19.tar.gz |
Merge branch 'rs/date-mode-pass-by-value'
The codepaths that reach date_mode_from_type() have been updated to
pass "struct date_mode" by value to make them thread safe.
* rs/date-mode-pass-by-value:
date: make DATE_MODE thread-safe
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/blame.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index db1f56de61..9aa74680a3 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -316,7 +316,7 @@ static const char *format_time(timestamp_t time, const char *tz_str, size_t time_width; int tz; tz = atoi(tz_str); - time_str = show_date(time, tz, &blame_date_mode); + time_str = show_date(time, tz, blame_date_mode); strbuf_addstr(&time_buf, time_str); /* * Add space paddings to time_buf to display a fixed width @@ -1029,7 +1029,7 @@ parse_done: blame_date_width = sizeof("Thu Oct 19 16:00:04 2006 -0700"); break; case DATE_STRFTIME: - blame_date_width = strlen(show_date(0, 0, &blame_date_mode)) + 1; /* add the null */ + blame_date_width = strlen(show_date(0, 0, blame_date_mode)) + 1; /* add the null */ break; } blame_date_width -= 1; /* strip the null */ |