| 369 | } |
| 370 | |
| 371 | static 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 | |
| 387 | static int decode_q_segment(struct strbuf *out, const struct strbuf *q_seg, |
| 388 | int rfc2047) |
no outgoing calls
no test coverage detected