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

Function parse_timestamp_from_buf

fsck.c:861–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859}
860
861static timestamp_t parse_timestamp_from_buf(const char **start, const char *end)
862{
863 const char *p = *start;
864 char buf[24]; /* big enough for 2^64 */
865 size_t i = 0;
866
867 while (p < end && isdigit(*p)) {
868 if (i >= ARRAY_SIZE(buf) - 1)
869 return TIME_MAX;
870 buf[i++] = *p++;
871 }
872 buf[i] = '\0';
873 *start = p;
874 return parse_timestamp(buf, NULL, 10);
875}
876
877static int fsck_ident(const char **ident, const char *ident_end,
878 const struct object_id *oid, enum object_type type,

Callers 1

fsck_identFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected