diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-11-20 14:47:17 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-11-20 14:47:17 +0900 |
| commit | 38e4df6615557b6e862f5dbaa7e153850424a02e (patch) | |
| tree | 930d7e2ae80070767b0d60fb3fe792849b13d766 /builtin | |
| parent | ff44124044f67a1b7e43d4af8be45ce9f555951b (diff) | |
| parent | 3f0346d4dcdb6cf03f758895719dfe1e6a8cc696 (diff) | |
| download | git-38e4df6615557b6e862f5dbaa7e153850424a02e.tar.gz | |
Merge branch 'la/trailer-info'
Renaming a handful of variables and structure fields.
* la/trailer-info:
trailer: spread usage of "trailer_block" language
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/interpret-trailers.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/builtin/interpret-trailers.c b/builtin/interpret-trailers.c index c5e56e2cd3..44d8ccddc9 100644 --- a/builtin/interpret-trailers.c +++ b/builtin/interpret-trailers.c @@ -141,8 +141,8 @@ static void interpret_trailers(const struct process_trailer_options *opts, { LIST_HEAD(head); struct strbuf sb = STRBUF_INIT; - struct strbuf trailer_block = STRBUF_INIT; - struct trailer_info *info; + struct strbuf trailer_block_sb = STRBUF_INIT; + struct trailer_block *trailer_block; FILE *outfile = stdout; trailer_config_init(); @@ -152,13 +152,13 @@ static void interpret_trailers(const struct process_trailer_options *opts, if (opts->in_place) outfile = create_in_place_tempfile(file); - info = parse_trailers(opts, sb.buf, &head); + trailer_block = parse_trailers(opts, sb.buf, &head); - /* Print the lines before the trailers */ + /* Print the lines before the trailer block */ if (!opts->only_trailers) - fwrite(sb.buf, 1, trailer_block_start(info), outfile); + fwrite(sb.buf, 1, trailer_block_start(trailer_block), outfile); - if (!opts->only_trailers && !blank_line_before_trailer_block(info)) + if (!opts->only_trailers && !blank_line_before_trailer_block(trailer_block)) fprintf(outfile, "\n"); @@ -172,15 +172,16 @@ static void interpret_trailers(const struct process_trailer_options *opts, } /* Print trailer block. */ - format_trailers(opts, &head, &trailer_block); + format_trailers(opts, &head, &trailer_block_sb); free_trailers(&head); - fwrite(trailer_block.buf, 1, trailer_block.len, outfile); - strbuf_release(&trailer_block); + fwrite(trailer_block_sb.buf, 1, trailer_block_sb.len, outfile); + strbuf_release(&trailer_block_sb); - /* Print the lines after the trailers as is */ + /* Print the lines after the trailer block as is. */ if (!opts->only_trailers) - fwrite(sb.buf + trailer_block_end(info), 1, sb.len - trailer_block_end(info), outfile); - trailer_info_release(info); + fwrite(sb.buf + trailer_block_end(trailer_block), 1, + sb.len - trailer_block_end(trailer_block), outfile); + trailer_block_release(trailer_block); if (opts->in_place) if (rename_tempfile(&trailers_tempfile, file)) |
