commit: make ignore_non_trailer take buf/len

Make ignore_non_trailer take a buf/len pair instead of struct strbuf.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jonathan Tan
2016-11-02 10:29:17 -07:00
committed by Junio C Hamano
parent e4319562bc
commit 710714aaa8
4 changed files with 14 additions and 14 deletions

View File

@ -842,7 +842,7 @@ static int find_trailer_end(struct strbuf **lines, int patch_start)
for (i = 0; i < patch_start; i++)
strbuf_addbuf(&sb, lines[i]);
ignore_bytes = ignore_non_trailer(&sb);
ignore_bytes = ignore_non_trailer(sb.buf, sb.len);
strbuf_release(&sb);
for (i = patch_start - 1; i >= 0 && ignore_bytes > 0; i--)
ignore_bytes -= lines[i]->len;