mirror of
https://github.com/git/git
synced 2024-09-29 21:27:13 +00:00
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
This commit is contained in:
commit
107313eb11
|
@ -316,7 +316,7 @@ static const char *format_time(timestamp_t time, const char *tz_str,
|
||||||
size_t time_width;
|
size_t time_width;
|
||||||
int tz;
|
int tz;
|
||||||
tz = atoi(tz_str);
|
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);
|
strbuf_addstr(&time_buf, time_str);
|
||||||
/*
|
/*
|
||||||
* Add space paddings to time_buf to display a fixed width
|
* Add space paddings to time_buf to display a fixed width
|
||||||
|
@ -1029,7 +1029,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
|
||||||
blame_date_width = sizeof("Thu Oct 19 16:00:04 2006 -0700");
|
blame_date_width = sizeof("Thu Oct 19 16:00:04 2006 -0700");
|
||||||
break;
|
break;
|
||||||
case DATE_STRFTIME:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
blame_date_width -= 1; /* strip the null */
|
blame_date_width -= 1; /* strip the null */
|
||||||
|
|
36
date.c
36
date.c
|
@ -207,13 +207,13 @@ void show_date_relative(timestamp_t time, struct strbuf *timebuf)
|
||||||
(diff + 183) / 365);
|
(diff + 183) / 365);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct date_mode *date_mode_from_type(enum date_mode_type type)
|
struct date_mode date_mode_from_type(enum date_mode_type type)
|
||||||
{
|
{
|
||||||
static struct date_mode mode = DATE_MODE_INIT;
|
struct date_mode mode = DATE_MODE_INIT;
|
||||||
if (type == DATE_STRFTIME)
|
if (type == DATE_STRFTIME)
|
||||||
BUG("cannot create anonymous strftime date_mode struct");
|
BUG("cannot create anonymous strftime date_mode struct");
|
||||||
mode.type = type;
|
mode.type = type;
|
||||||
return &mode;
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_date_normal(struct strbuf *buf, timestamp_t time, struct tm *tm, int tz, struct tm *human_tm, int human_tz, int local)
|
static void show_date_normal(struct strbuf *buf, timestamp_t time, struct tm *tm, int tz, struct tm *human_tm, int human_tz, int local)
|
||||||
|
@ -283,7 +283,7 @@ static void show_date_normal(struct strbuf *buf, timestamp_t time, struct tm *tm
|
||||||
strbuf_addf(buf, " %+05d", tz);
|
strbuf_addf(buf, " %+05d", tz);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *show_date(timestamp_t time, int tz, const struct date_mode *mode)
|
const char *show_date(timestamp_t time, int tz, struct date_mode mode)
|
||||||
{
|
{
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
struct tm tmbuf = { 0 };
|
struct tm tmbuf = { 0 };
|
||||||
|
@ -291,13 +291,13 @@ const char *show_date(timestamp_t time, int tz, const struct date_mode *mode)
|
||||||
int human_tz = -1;
|
int human_tz = -1;
|
||||||
static struct strbuf timebuf = STRBUF_INIT;
|
static struct strbuf timebuf = STRBUF_INIT;
|
||||||
|
|
||||||
if (mode->type == DATE_UNIX) {
|
if (mode.type == DATE_UNIX) {
|
||||||
strbuf_reset(&timebuf);
|
strbuf_reset(&timebuf);
|
||||||
strbuf_addf(&timebuf, "%"PRItime, time);
|
strbuf_addf(&timebuf, "%"PRItime, time);
|
||||||
return timebuf.buf;
|
return timebuf.buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode->type == DATE_HUMAN) {
|
if (mode.type == DATE_HUMAN) {
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
|
||||||
get_time(&now);
|
get_time(&now);
|
||||||
|
@ -306,22 +306,22 @@ const char *show_date(timestamp_t time, int tz, const struct date_mode *mode)
|
||||||
human_tz = local_time_tzoffset(now.tv_sec, &human_tm);
|
human_tz = local_time_tzoffset(now.tv_sec, &human_tm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode->local)
|
if (mode.local)
|
||||||
tz = local_tzoffset(time);
|
tz = local_tzoffset(time);
|
||||||
|
|
||||||
if (mode->type == DATE_RAW) {
|
if (mode.type == DATE_RAW) {
|
||||||
strbuf_reset(&timebuf);
|
strbuf_reset(&timebuf);
|
||||||
strbuf_addf(&timebuf, "%"PRItime" %+05d", time, tz);
|
strbuf_addf(&timebuf, "%"PRItime" %+05d", time, tz);
|
||||||
return timebuf.buf;
|
return timebuf.buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode->type == DATE_RELATIVE) {
|
if (mode.type == DATE_RELATIVE) {
|
||||||
strbuf_reset(&timebuf);
|
strbuf_reset(&timebuf);
|
||||||
show_date_relative(time, &timebuf);
|
show_date_relative(time, &timebuf);
|
||||||
return timebuf.buf;
|
return timebuf.buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode->local)
|
if (mode.local)
|
||||||
tm = time_to_tm_local(time, &tmbuf);
|
tm = time_to_tm_local(time, &tmbuf);
|
||||||
else
|
else
|
||||||
tm = time_to_tm(time, tz, &tmbuf);
|
tm = time_to_tm(time, tz, &tmbuf);
|
||||||
|
@ -331,17 +331,17 @@ const char *show_date(timestamp_t time, int tz, const struct date_mode *mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
strbuf_reset(&timebuf);
|
strbuf_reset(&timebuf);
|
||||||
if (mode->type == DATE_SHORT)
|
if (mode.type == DATE_SHORT)
|
||||||
strbuf_addf(&timebuf, "%04d-%02d-%02d", tm->tm_year + 1900,
|
strbuf_addf(&timebuf, "%04d-%02d-%02d", tm->tm_year + 1900,
|
||||||
tm->tm_mon + 1, tm->tm_mday);
|
tm->tm_mon + 1, tm->tm_mday);
|
||||||
else if (mode->type == DATE_ISO8601)
|
else if (mode.type == DATE_ISO8601)
|
||||||
strbuf_addf(&timebuf, "%04d-%02d-%02d %02d:%02d:%02d %+05d",
|
strbuf_addf(&timebuf, "%04d-%02d-%02d %02d:%02d:%02d %+05d",
|
||||||
tm->tm_year + 1900,
|
tm->tm_year + 1900,
|
||||||
tm->tm_mon + 1,
|
tm->tm_mon + 1,
|
||||||
tm->tm_mday,
|
tm->tm_mday,
|
||||||
tm->tm_hour, tm->tm_min, tm->tm_sec,
|
tm->tm_hour, tm->tm_min, tm->tm_sec,
|
||||||
tz);
|
tz);
|
||||||
else if (mode->type == DATE_ISO8601_STRICT) {
|
else if (mode.type == DATE_ISO8601_STRICT) {
|
||||||
strbuf_addf(&timebuf, "%04d-%02d-%02dT%02d:%02d:%02d",
|
strbuf_addf(&timebuf, "%04d-%02d-%02dT%02d:%02d:%02d",
|
||||||
tm->tm_year + 1900,
|
tm->tm_year + 1900,
|
||||||
tm->tm_mon + 1,
|
tm->tm_mon + 1,
|
||||||
|
@ -354,16 +354,16 @@ const char *show_date(timestamp_t time, int tz, const struct date_mode *mode)
|
||||||
tz = abs(tz);
|
tz = abs(tz);
|
||||||
strbuf_addf(&timebuf, "%02d:%02d", tz / 100, tz % 100);
|
strbuf_addf(&timebuf, "%02d:%02d", tz / 100, tz % 100);
|
||||||
}
|
}
|
||||||
} else if (mode->type == DATE_RFC2822)
|
} else if (mode.type == DATE_RFC2822)
|
||||||
strbuf_addf(&timebuf, "%.3s, %d %.3s %d %02d:%02d:%02d %+05d",
|
strbuf_addf(&timebuf, "%.3s, %d %.3s %d %02d:%02d:%02d %+05d",
|
||||||
weekday_names[tm->tm_wday], tm->tm_mday,
|
weekday_names[tm->tm_wday], tm->tm_mday,
|
||||||
month_names[tm->tm_mon], tm->tm_year + 1900,
|
month_names[tm->tm_mon], tm->tm_year + 1900,
|
||||||
tm->tm_hour, tm->tm_min, tm->tm_sec, tz);
|
tm->tm_hour, tm->tm_min, tm->tm_sec, tz);
|
||||||
else if (mode->type == DATE_STRFTIME)
|
else if (mode.type == DATE_STRFTIME)
|
||||||
strbuf_addftime(&timebuf, mode->strftime_fmt, tm, tz,
|
strbuf_addftime(&timebuf, mode.strftime_fmt, tm, tz,
|
||||||
!mode->local);
|
!mode.local);
|
||||||
else
|
else
|
||||||
show_date_normal(&timebuf, time, tm, tz, &human_tm, human_tz, mode->local);
|
show_date_normal(&timebuf, time, tm, tz, &human_tm, human_tz, mode.local);
|
||||||
return timebuf.buf;
|
return timebuf.buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
6
date.h
6
date.h
|
@ -22,8 +22,8 @@ enum date_mode_type {
|
||||||
|
|
||||||
struct date_mode {
|
struct date_mode {
|
||||||
enum date_mode_type type;
|
enum date_mode_type type;
|
||||||
const char *strftime_fmt;
|
|
||||||
int local;
|
int local;
|
||||||
|
const char *strftime_fmt;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DATE_MODE_INIT { \
|
#define DATE_MODE_INIT { \
|
||||||
|
@ -36,14 +36,14 @@ struct date_mode {
|
||||||
* show_date(t, tz, DATE_MODE(NORMAL));
|
* show_date(t, tz, DATE_MODE(NORMAL));
|
||||||
*/
|
*/
|
||||||
#define DATE_MODE(t) date_mode_from_type(DATE_##t)
|
#define DATE_MODE(t) date_mode_from_type(DATE_##t)
|
||||||
struct date_mode *date_mode_from_type(enum date_mode_type type);
|
struct date_mode date_mode_from_type(enum date_mode_type type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format <'time', 'timezone'> into static memory according to 'mode'
|
* Format <'time', 'timezone'> into static memory according to 'mode'
|
||||||
* and return it. The mode is an initialized "struct date_mode"
|
* and return it. The mode is an initialized "struct date_mode"
|
||||||
* (usually from the DATE_MODE() macro).
|
* (usually from the DATE_MODE() macro).
|
||||||
*/
|
*/
|
||||||
const char *show_date(timestamp_t time, int timezone, const struct date_mode *mode);
|
const char *show_date(timestamp_t time, int timezone, struct date_mode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse a date format for later use with show_date().
|
* Parse a date format for later use with show_date().
|
||||||
|
|
|
@ -483,7 +483,7 @@ static int verify_ssh_signed_buffer(struct signature_check *sigc,
|
||||||
|
|
||||||
if (sigc->payload_timestamp)
|
if (sigc->payload_timestamp)
|
||||||
strbuf_addf(&verify_time, "-Overify-time=%s",
|
strbuf_addf(&verify_time, "-Overify-time=%s",
|
||||||
show_date(sigc->payload_timestamp, 0, &verify_date_mode));
|
show_date(sigc->payload_timestamp, 0, verify_date_mode));
|
||||||
|
|
||||||
/* Find the principal from the signers */
|
/* Find the principal from the signers */
|
||||||
strvec_pushl(&ssh_keygen.args, fmt->program,
|
strvec_pushl(&ssh_keygen.args, fmt->program,
|
||||||
|
|
|
@ -773,7 +773,7 @@ void show_log(struct rev_info *opt)
|
||||||
*/
|
*/
|
||||||
show_reflog_message(opt->reflog_info,
|
show_reflog_message(opt->reflog_info,
|
||||||
opt->commit_format == CMIT_FMT_ONELINE,
|
opt->commit_format == CMIT_FMT_ONELINE,
|
||||||
&opt->date_mode,
|
opt->date_mode,
|
||||||
opt->date_mode_explicit);
|
opt->date_mode_explicit);
|
||||||
if (opt->commit_format == CMIT_FMT_ONELINE)
|
if (opt->commit_format == CMIT_FMT_ONELINE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -11,7 +11,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||||
int16_t tz;
|
int16_t tz;
|
||||||
timestamp_t ts;
|
timestamp_t ts;
|
||||||
enum date_mode_type dmtype;
|
enum date_mode_type dmtype;
|
||||||
struct date_mode *dm;
|
struct date_mode dm;
|
||||||
|
|
||||||
if (size <= 4)
|
if (size <= 4)
|
||||||
/*
|
/*
|
||||||
|
@ -40,10 +40,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||||
free(str);
|
free(str);
|
||||||
|
|
||||||
dm = date_mode_from_type(dmtype);
|
dm = date_mode_from_type(dmtype);
|
||||||
dm->local = local;
|
dm.local = local;
|
||||||
show_date(ts, (int)tz, dm);
|
show_date(ts, (int)tz, dm);
|
||||||
|
|
||||||
date_mode_release(dm);
|
date_mode_release(&dm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
18
pretty.c
18
pretty.c
|
@ -428,7 +428,7 @@ static void add_rfc2047(struct strbuf *sb, const char *line, size_t len,
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *show_ident_date(const struct ident_split *ident,
|
const char *show_ident_date(const struct ident_split *ident,
|
||||||
const struct date_mode *mode)
|
struct date_mode mode)
|
||||||
{
|
{
|
||||||
timestamp_t date = 0;
|
timestamp_t date = 0;
|
||||||
long tz = 0;
|
long tz = 0;
|
||||||
|
@ -592,7 +592,7 @@ void pp_user_info(struct pretty_print_context *pp,
|
||||||
switch (pp->fmt) {
|
switch (pp->fmt) {
|
||||||
case CMIT_FMT_MEDIUM:
|
case CMIT_FMT_MEDIUM:
|
||||||
strbuf_addf(sb, "Date: %s\n",
|
strbuf_addf(sb, "Date: %s\n",
|
||||||
show_ident_date(&ident, &pp->date_mode));
|
show_ident_date(&ident, pp->date_mode));
|
||||||
break;
|
break;
|
||||||
case CMIT_FMT_EMAIL:
|
case CMIT_FMT_EMAIL:
|
||||||
case CMIT_FMT_MBOXRD:
|
case CMIT_FMT_MBOXRD:
|
||||||
|
@ -601,7 +601,7 @@ void pp_user_info(struct pretty_print_context *pp,
|
||||||
break;
|
break;
|
||||||
case CMIT_FMT_FULLER:
|
case CMIT_FMT_FULLER:
|
||||||
strbuf_addf(sb, "%sDate: %s\n", what,
|
strbuf_addf(sb, "%sDate: %s\n", what,
|
||||||
show_ident_date(&ident, &pp->date_mode));
|
show_ident_date(&ident, pp->date_mode));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* notin' */
|
/* notin' */
|
||||||
|
@ -775,7 +775,7 @@ static int mailmap_name(const char **email, size_t *email_len,
|
||||||
|
|
||||||
static size_t format_person_part(struct strbuf *sb, char part,
|
static size_t format_person_part(struct strbuf *sb, char part,
|
||||||
const char *msg, int len,
|
const char *msg, int len,
|
||||||
const struct date_mode *dmode)
|
struct date_mode dmode)
|
||||||
{
|
{
|
||||||
/* currently all placeholders have same length */
|
/* currently all placeholders have same length */
|
||||||
const int placeholder_len = 2;
|
const int placeholder_len = 2;
|
||||||
|
@ -1034,7 +1034,7 @@ static void rewrap_message_tail(struct strbuf *sb,
|
||||||
static int format_reflog_person(struct strbuf *sb,
|
static int format_reflog_person(struct strbuf *sb,
|
||||||
char part,
|
char part,
|
||||||
struct reflog_walk_info *log,
|
struct reflog_walk_info *log,
|
||||||
const struct date_mode *dmode)
|
struct date_mode dmode)
|
||||||
{
|
{
|
||||||
const char *ident;
|
const char *ident;
|
||||||
|
|
||||||
|
@ -1602,7 +1602,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
|
||||||
if (c->pretty_ctx->reflog_info)
|
if (c->pretty_ctx->reflog_info)
|
||||||
get_reflog_selector(sb,
|
get_reflog_selector(sb,
|
||||||
c->pretty_ctx->reflog_info,
|
c->pretty_ctx->reflog_info,
|
||||||
&c->pretty_ctx->date_mode,
|
c->pretty_ctx->date_mode,
|
||||||
c->pretty_ctx->date_mode_explicit,
|
c->pretty_ctx->date_mode_explicit,
|
||||||
(placeholder[1] == 'd'));
|
(placeholder[1] == 'd'));
|
||||||
return 2;
|
return 2;
|
||||||
|
@ -1617,7 +1617,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
|
||||||
return format_reflog_person(sb,
|
return format_reflog_person(sb,
|
||||||
placeholder[1],
|
placeholder[1],
|
||||||
c->pretty_ctx->reflog_info,
|
c->pretty_ctx->reflog_info,
|
||||||
&c->pretty_ctx->date_mode);
|
c->pretty_ctx->date_mode);
|
||||||
}
|
}
|
||||||
return 0; /* unknown %g placeholder */
|
return 0; /* unknown %g placeholder */
|
||||||
case 'N':
|
case 'N':
|
||||||
|
@ -1712,11 +1712,11 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
|
||||||
case 'a': /* author ... */
|
case 'a': /* author ... */
|
||||||
return format_person_part(sb, placeholder[1],
|
return format_person_part(sb, placeholder[1],
|
||||||
msg + c->author.off, c->author.len,
|
msg + c->author.off, c->author.len,
|
||||||
&c->pretty_ctx->date_mode);
|
c->pretty_ctx->date_mode);
|
||||||
case 'c': /* committer ... */
|
case 'c': /* committer ... */
|
||||||
return format_person_part(sb, placeholder[1],
|
return format_person_part(sb, placeholder[1],
|
||||||
msg + c->committer.off, c->committer.len,
|
msg + c->committer.off, c->committer.len,
|
||||||
&c->pretty_ctx->date_mode);
|
c->pretty_ctx->date_mode);
|
||||||
case 'e': /* encoding */
|
case 'e': /* encoding */
|
||||||
if (c->commit_encoding)
|
if (c->commit_encoding)
|
||||||
strbuf_addstr(sb, c->commit_encoding);
|
strbuf_addstr(sb, c->commit_encoding);
|
||||||
|
|
2
pretty.h
2
pretty.h
|
@ -167,7 +167,7 @@ int format_set_trailers_options(struct process_trailer_options *opts,
|
||||||
* a well-known sentinel date if they appear bogus.
|
* a well-known sentinel date if they appear bogus.
|
||||||
*/
|
*/
|
||||||
const char *show_ident_date(const struct ident_split *id,
|
const char *show_ident_date(const struct ident_split *id,
|
||||||
const struct date_mode *mode);
|
struct date_mode mode);
|
||||||
|
|
||||||
|
|
||||||
#endif /* PRETTY_H */
|
#endif /* PRETTY_H */
|
||||||
|
|
|
@ -1627,7 +1627,7 @@ static void grab_date(const char *buf, struct atom_value *v, const char *atomnam
|
||||||
tz = strtol(zone, NULL, 10);
|
tz = strtol(zone, NULL, 10);
|
||||||
if ((tz == LONG_MIN || tz == LONG_MAX) && errno == ERANGE)
|
if ((tz == LONG_MIN || tz == LONG_MAX) && errno == ERANGE)
|
||||||
goto bad;
|
goto bad;
|
||||||
v->s = xstrdup(show_date(timestamp, tz, &date_mode));
|
v->s = xstrdup(show_date(timestamp, tz, date_mode));
|
||||||
v->value = timestamp;
|
v->value = timestamp;
|
||||||
date_mode_release(&date_mode);
|
date_mode_release(&date_mode);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -223,7 +223,7 @@ int add_reflog_for_walk(struct reflog_walk_info *info,
|
||||||
|
|
||||||
void get_reflog_selector(struct strbuf *sb,
|
void get_reflog_selector(struct strbuf *sb,
|
||||||
struct reflog_walk_info *reflog_info,
|
struct reflog_walk_info *reflog_info,
|
||||||
const struct date_mode *dmode, int force_date,
|
struct date_mode dmode, int force_date,
|
||||||
int shorten)
|
int shorten)
|
||||||
{
|
{
|
||||||
struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog;
|
struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog;
|
||||||
|
@ -297,7 +297,7 @@ timestamp_t get_reflog_timestamp(struct reflog_walk_info *reflog_info)
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_reflog_message(struct reflog_walk_info *reflog_info, int oneline,
|
void show_reflog_message(struct reflog_walk_info *reflog_info, int oneline,
|
||||||
const struct date_mode *dmode, int force_date)
|
struct date_mode dmode, int force_date)
|
||||||
{
|
{
|
||||||
if (reflog_info && reflog_info->last_commit_reflog) {
|
if (reflog_info && reflog_info->last_commit_reflog) {
|
||||||
struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog;
|
struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog;
|
||||||
|
|
|
@ -10,14 +10,14 @@ void reflog_walk_info_release(struct reflog_walk_info *info);
|
||||||
int add_reflog_for_walk(struct reflog_walk_info *info,
|
int add_reflog_for_walk(struct reflog_walk_info *info,
|
||||||
struct commit *commit, const char *name);
|
struct commit *commit, const char *name);
|
||||||
void show_reflog_message(struct reflog_walk_info *info, int,
|
void show_reflog_message(struct reflog_walk_info *info, int,
|
||||||
const struct date_mode *, int force_date);
|
struct date_mode, int force_date);
|
||||||
void get_reflog_message(struct strbuf *sb,
|
void get_reflog_message(struct strbuf *sb,
|
||||||
struct reflog_walk_info *reflog_info);
|
struct reflog_walk_info *reflog_info);
|
||||||
const char *get_reflog_ident(struct reflog_walk_info *reflog_info);
|
const char *get_reflog_ident(struct reflog_walk_info *reflog_info);
|
||||||
timestamp_t get_reflog_timestamp(struct reflog_walk_info *reflog_info);
|
timestamp_t get_reflog_timestamp(struct reflog_walk_info *reflog_info);
|
||||||
void get_reflog_selector(struct strbuf *sb,
|
void get_reflog_selector(struct strbuf *sb,
|
||||||
struct reflog_walk_info *reflog_info,
|
struct reflog_walk_info *reflog_info,
|
||||||
const struct date_mode *dmode, int force_date,
|
struct date_mode dmode, int force_date,
|
||||||
int shorten);
|
int shorten);
|
||||||
|
|
||||||
int reflog_walk_empty(struct reflog_walk_info *walk);
|
int reflog_walk_empty(struct reflog_walk_info *walk);
|
||||||
|
|
|
@ -52,7 +52,7 @@ static void show_dates(const char **argv, const char *format)
|
||||||
arg++;
|
arg++;
|
||||||
tz = atoi(arg);
|
tz = atoi(arg);
|
||||||
|
|
||||||
printf("%s -> %s\n", *argv, show_date(t, tz, &mode));
|
printf("%s -> %s\n", *argv, show_date(t, tz, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
date_mode_release(&mode);
|
date_mode_release(&mode);
|
||||||
|
|
Loading…
Reference in a new issue