mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'la/trailer-cleanups'
Fix to an already-graduated topic. * la/trailer-cleanups: trailer: fix comment/cut-line regression with opts->no_divider
This commit is contained in:
15
trailer.c
15
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user