Message ID | 20200930123411.GI1901279@coredump.intra.peff.net (mailing list archive) |
---|---|
State | Accepted |
Commit | 9dad073d4b9b6679c3e86f28aacf79f85ed786d2 |
Headers | show |
Series | dropping more unused parameters | expand |
diff --git a/sequencer.c b/sequencer.c index 6e9aabaac1..e454264fbc 100644 --- a/sequencer.c +++ b/sequencer.c @@ -249,11 +249,20 @@ static int has_conforming_footer(struct strbuf *sb, struct strbuf *sob, struct trailer_info info; size_t i; int found_sob = 0, found_sob_last = 0; + char saved_char; opts.no_divider = 1; + if (ignore_footer) { + saved_char = sb->buf[sb->len - ignore_footer]; + sb->buf[sb->len - ignore_footer] = '\0'; + } + trailer_info_get(&info, sb->buf, &opts); + if (ignore_footer) + sb->buf[sb->len - ignore_footer] = saved_char; + if (info.trailer_start == info.trailer_end) return 0;