git/builtin
Linus Arver 24a25c630c trailer: make parse_trailers() return trailer_info pointer
This is the second and final preparatory commit for making the
trailer_info struct private to the trailer implementation.

Make trailer_info_get() do the actual work of allocating a new
trailer_info struct, and return a pointer to it. Because
parse_trailers() wraps around trailer_info_get(), it too can return this
pointer to the caller. From the trailer API user's perspective, the call
to trailer_info_new() can be replaced with parse_trailers(); do so in
interpret-trailers.

Because trailer_info_new() is no longer called by interpret-trailers,
remove this function from the trailer API.

With this change, we no longer allocate trailer_info on the stack ---
all uses of it are via a pointer where the actual data is always
allocated at runtime through trailer_info_new(). Make
trailer_info_release() free this dynamically allocated memory.

Finally, due to the way the function signatures of parse_trailers() and
trailer_info_get() have changed, update the callsites in
format_trailers_from_commit() and trailer_iterator_init() accordingly.

Helped-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Linus Arver <linus@ucla.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-05-02 09:57:08 -07:00
..
add.c Merge branch 'eg/add-uflags' 2024-03-07 15:59:41 -08:00
am.c
annotate.c
apply.c
archive.c
bisect.c
blame.c
branch.c Merge branch 'kh/branch-ref-syntax-advice' 2024-03-15 16:05:59 -07:00
bugreport.c
bundle.c
cat-file.c
check-attr.c
check-ignore.c
check-mailmap.c
check-ref-format.c
checkout--worker.c
checkout-index.c
checkout.c Merge branch 'js/merge-tree-3-trees' 2024-03-07 15:59:41 -08:00
clean.c clean: further clean-up of implementation around "--force" 2024-03-04 14:05:13 -08:00
clone.c Merge branch 'as/option-names-in-messages' 2024-03-15 16:05:59 -07:00
column.c
commit-graph.c
commit-tree.c
commit.c Merge branch 'jt/commit-redundant-scissors-fix' 2024-03-07 15:59:41 -08:00
config.c
count-objects.c
credential-cache--daemon.c
credential-cache.c
credential-store.c
credential.c
describe.c
diagnose.c
diff-files.c
diff-index.c
diff-tree.c
diff.c
difftool.c
fast-export.c
fast-import.c commit-reach(repo_in_merge_bases_many): report missing commits 2024-02-28 09:47:03 -08:00
fetch-pack.c
fetch.c Merge branch 'js/merge-base-with-missing-commit' 2024-03-11 14:12:30 -07:00
fmt-merge-msg.c
for-each-ref.c for-each-ref: add new option to include root refs 2024-02-23 10:36:28 -08:00
for-each-repo.c
fsck.c refs: drop unused params from the reflog iterator callback 2024-02-21 09:58:06 -08:00
fsmonitor--daemon.c
gc.c
get-tar-commit-id.c
grep.c
hash-object.c
help.c
hook.c
index-pack.c unpack: replace xwrite() loop with write_in_full() 2024-03-02 11:12:16 -08:00
init-db.c
interpret-trailers.c trailer: make parse_trailers() return trailer_info pointer 2024-05-02 09:57:08 -07:00
log.c commit-reach(repo_get_merge_bases_many): pass on "missing commits" errors 2024-02-29 08:06:01 -08:00
ls-files.c
ls-remote.c
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c commit-reach(repo_get_merge_bases_many_dirty): pass on errors 2024-02-29 08:06:01 -08:00
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c Merge branch 'js/merge-base-with-missing-commit' 2024-03-11 14:12:30 -07:00
merge.c Merge branch 'js/merge-base-with-missing-commit' 2024-03-11 14:12:30 -07:00
mktag.c
mktree.c
multi-pack-index.c
mv.c
name-rev.c name-rev: use mem_pool_strfmt() 2024-02-26 09:35:40 -08:00
notes.c
pack-objects.c
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c
pull.c commit-reach(get_octopus_merge_bases): pass on "missing commits" errors 2024-02-29 08:06:01 -08:00
push.c
range-diff.c
read-tree.c Merge branch 'js/merge-tree-3-trees' 2024-03-07 15:59:41 -08:00
rebase.c Merge branch 'js/merge-base-with-missing-commit' 2024-03-11 14:12:30 -07:00
receive-pack.c commit-reach(repo_in_merge_bases_many): report missing commits 2024-02-28 09:47:03 -08:00
reflog.c Merge branch 'ps/reflog-list' into HEAD 2024-03-01 14:38:55 -08:00
remote-ext.c
remote-fd.c
remote.c builtin/remote.c: trivial fix of error message 2024-03-05 14:11:56 -08:00
repack.c repack: check error writing to pack-objects subprocess 2024-03-02 11:12:16 -08:00
replace.c
replay.c
rerere.c
reset.c Merge branch 'js/merge-tree-3-trees' 2024-03-07 15:59:41 -08:00
rev-list.c
rev-parse.c commit-reach(repo_get_merge_bases): pass on "missing commits" errors 2024-02-29 08:06:01 -08:00
revert.c
rm.c
send-pack.c
shortlog.c
show-branch.c
show-index.c
show-ref.c
sparse-checkout.c
stash.c
stripspace.c
submodule--helper.c
symbolic-ref.c
tag.c Merge branch 'rj/tag-column-fix' 2024-02-27 16:04:32 -08:00
unpack-file.c
unpack-objects.c unpack: replace xwrite() loop with write_in_full() 2024-03-02 11:12:16 -08:00
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
upload-pack.c upload-pack: always turn off save_commit_buffer 2024-02-28 14:42:01 -08:00
var.c
verify-commit.c
verify-pack.c
verify-tag.c
worktree.c
write-tree.c