X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=trailer.c;h=ef9df4af558fbb18849279cff2e67507026af106;hb=a56bb9f66ab8dbbb07cf70496f829dd42b5c63d6;hp=3a0710a4583a4a11fa5a87cda88ef6a3d0610870;hpb=fb3ead665bd3371e31cebe716c973c82ff8545eb;p=thirdparty%2Fgit.git diff --git a/trailer.c b/trailer.c index 3a0710a458..ef9df4af55 100644 --- a/trailer.c +++ b/trailer.c @@ -845,16 +845,15 @@ static size_t find_end_of_log_message(const char *input, int no_divider) /* Assume the naive end of the input is already what we want. */ end = strlen(input); - if (no_divider) - return end; - /* Optionally skip over any patch part ("---" line and below). */ - for (s = input; *s; s = next_line(s)) { - const char *v; + if (!no_divider) { + for (s = input; *s; s = next_line(s)) { + const char *v; - if (skip_prefix(s, "---", &v) && isspace(*v)) { - end = s - input; - break; + if (skip_prefix(s, "---", &v) && isspace(*v)) { + end = s - input; + break; + } } }