MCPcopy Create free account
hub / github.com/git/git / show_ident_date

Function show_ident_date

pretty.c:442–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442const char *show_ident_date(const struct ident_split *ident,
443 struct date_mode mode)
444{
445 timestamp_t date = 0;
446 long tz = 0;
447
448 if (ident->date_begin && ident->date_end)
449 date = parse_timestamp(ident->date_begin, NULL, 10);
450 if (date_overflows(date))
451 date = 0;
452 else {
453 if (ident->tz_begin && ident->tz_end)
454 tz = strtol(ident->tz_begin, NULL, 10);
455 if (tz >= INT_MAX || tz <= INT_MIN)
456 tz = 0;
457 }
458 return show_date(date, tz, mode);
459}
460
461static inline void strbuf_add_with_color(struct strbuf *sb, const char *color,
462 const char *buf, size_t buflen)

Callers 4

pp_user_infoFunction · 0.85
format_person_partFunction · 0.85
get_commit_infoFunction · 0.85
prepare_to_commitFunction · 0.85

Calls 2

date_overflowsFunction · 0.85
show_dateFunction · 0.85

Tested by

no test coverage detected