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

Function is_format_patch_separator

mailinfo.c:371–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371static int is_format_patch_separator(const char *line, int len)
372{
373 static const char SAMPLE[] =
374 "From e6807f3efca28b30decfecb1732a56c7db1137ee Mon Sep 17 00:00:00 2001\n";
375 const char *cp;
376
377 if (len != strlen(SAMPLE))
378 return 0;
379 if (!skip_prefix(line, "From ", &cp))
380 return 0;
381 if (strspn(cp, "0123456789abcdef") != 40)
382 return 0;
383 cp += 40;
384 return !memcmp(SAMPLE + (cp - line), cp, strlen(SAMPLE) - (cp - line));
385}
386
387static int decode_q_segment(struct strbuf *out, const struct strbuf *q_seg,
388 int rfc2047)

Callers 1

check_inbody_headerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected