Revert "trailer: teach find_patch_start about --no-divider"

This reverts commit ee8c5ee08c, which
was premature.  It will be replaced with an updated patch.
This commit is contained in:
Junio C Hamano
2023-09-22 16:17:03 -07:00
parent a519df3a42
commit 0d803f2547

View File

@ -812,14 +812,14 @@ static ssize_t last_line(const char *buf, size_t len)
* Return the position of the start of the patch or the length of str if there
* is no patch in the message.
*/
static size_t find_patch_start(const char *str, int no_divider)
static size_t find_patch_start(const char *str)
{
const char *s;
for (s = str; *s; s = next_line(s)) {
const char *v;
if (!no_divider && skip_prefix(s, "---", &v) && isspace(*v))
if (skip_prefix(s, "---", &v) && isspace(*v))
return s - str;
}
@ -1109,7 +1109,11 @@ void trailer_info_get(struct trailer_info *info, const char *str,
ensure_configured();
patch_start = find_patch_start(str, opts->no_divider);
if (opts->no_divider)
patch_start = strlen(str);
else
patch_start = find_patch_start(str);
trailer_end = find_trailer_end(str, patch_start);
trailer_start = find_trailer_start(str, trailer_end);