git/builtin
Patrick Steinhardt d91a9db33c global: drop `UNLEAK()` annotation
There are two users of `UNLEAK()` left in our codebase:

  - In "builtin/clone.c", annotating the `repo` variable. That leak has
    already been fixed though as you can see in the context, where we do
    know to free `repo_to_free`.

  - In "builtin/diff.c", to unleak entries of the `blob[]` array. That
    leak has also been fixed, because the entries we assign to that
    array come from `rev.pending.objects`, and we do eventually release
    `rev`.

This neatly demonstrates one of the issues with `UNLEAK()`: it is quite
easy for the annotation to become stale. A second issue is that its
whole intent is to paper over leaks. And while that has been a necessary
evil in the past, because Git was leaking left and right, it isn't
really much of an issue nowadays where our test suite has no known leaks
anymore.

Remove the last two users of this macro.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-11-21 08:23:46 +09:00
..
add.c git: pass in repo to builtin based on setup_git_directory_gently 2024-10-11 09:37:17 -07:00
am.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
annotate.c Merge branch 'jc/a-commands-without-the-repo' 2024-10-25 14:02:36 -04:00
apply.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
archive.c archive: remove the_repository global variable 2024-10-11 09:37:18 -07:00
bisect.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
blame.c builtin/blame: fix leaking blame entries with `--incremental` 2024-11-21 08:23:40 +09:00
branch.c builtin/branch: fix leaking sorting options 2024-11-21 08:23:45 +09:00
bugreport.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
bundle.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
cat-file.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
check-attr.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
check-ignore.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
check-mailmap.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
check-ref-format.c builtin: remove USE_THE_REPOSITORY for those without the_repository 2024-09-13 14:33:30 -07:00
checkout--worker.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
checkout-index.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
checkout.c checkout: refer to other-worktree branch, not ref 2024-10-10 13:09:13 -07:00
clean.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
clone.c global: drop `UNLEAK()` annotation 2024-11-21 08:23:46 +09:00
column.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
commit-graph.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
commit-tree.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
commit.c builtin/commit: fix leaking cleanup config 2024-11-04 22:37:54 -08:00
config.c git-config.1: remove value from positional args in unset usage 2024-10-08 23:35:45 -07:00
count-objects.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
credential-cache--daemon.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
credential-cache.c Merge branch 'rj/cygwin-exit' 2024-11-01 12:53:19 -04:00
credential-store.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
credential.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
describe.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
diagnose.c builtin: remove USE_THE_REPOSITORY for those without the_repository 2024-09-13 14:33:30 -07:00
diff-files.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
diff-index.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
diff-tree.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
diff.c global: drop `UNLEAK()` annotation 2024-11-21 08:23:46 +09:00
difftool.c global: Fix duplicate word typos 2024-10-21 16:05:04 -04:00
fast-export.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
fast-import.c packfile: convert find_sha1_pack() to use object_id 2024-10-25 17:35:46 -04:00
fetch-pack.c fetch-pack: clear pack lockfiles list 2024-09-25 10:24:54 -07:00
fetch.c fetch: respect --server-option when fetching multiple remotes 2024-10-08 10:22:09 -07:00
fmt-merge-msg.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
for-each-ref.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
for-each-repo.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
fsck.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
fsmonitor--daemon.c Merge branch 'jk/fsmonitor-event-listener-race-fix' 2024-10-15 16:56:43 -04:00
gc.c Merge branch 'ps/maintenance-start-crash-fix' 2024-10-18 13:56:26 -04:00
get-tar-commit-id.c builtin: remove USE_THE_REPOSITORY for those without the_repository 2024-09-13 14:33:30 -07:00
grep.c builtin/grep: fix leak with `--max-count=0` 2024-11-04 22:37:52 -08:00
hash-object.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
help.c builtin/help: fix leaks in `check_git_cmd()` 2024-11-21 08:23:44 +09:00
hook.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
index-pack.c pack-write: fix return parameter of `write_rev_file_order()` 2024-09-30 11:23:08 -07:00
init-db.c builtin/init-db: fix leaking directory paths 2024-11-21 08:23:45 +09:00
interpret-trailers.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
log.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
ls-files.c builtin: fix typos 2024-09-24 10:54:39 -07:00
ls-remote.c builtin/ls-remote: plug leaking server options 2024-11-04 22:37:51 -08:00
ls-tree.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
mailinfo.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
mailsplit.c builtin: remove USE_THE_REPOSITORY for those without the_repository 2024-09-13 14:33:30 -07:00
merge-base.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
merge-file.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
merge-index.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
merge-ours.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
merge-recursive.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
merge-tree.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
merge.c builtin/merge: release output buffer after performing merge 2024-11-04 22:37:57 -08:00
mktag.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
mktree.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
multi-pack-index.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
mv.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
name-rev.c builtin: fix typos 2024-09-24 10:54:39 -07:00
notes.c notes: teach the -e option to edit messages in editor 2024-10-21 15:52:48 -04:00
pack-objects.c packfile: use object_id in find_pack_entry_one() 2024-10-25 17:35:46 -04:00
pack-redundant.c packfile: drop sha1_pack_index_name() 2024-10-25 17:35:46 -04:00
pack-refs.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
patch-id.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
prune-packed.c builtin: remove USE_THE_REPOSITORY for those without the_repository 2024-09-13 14:33:30 -07:00
prune.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
pull.c Merge branch 'ps/leakfixes-part-7' 2024-10-02 07:46:26 -07:00
push.c transport: introduce parse_transport_option() method 2024-10-08 10:22:06 -07:00
range-diff.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
read-tree.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
rebase.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
receive-pack.c remote: fix leaking push reports 2024-09-30 11:23:08 -07:00
reflog.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
refs.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
remote-ext.c builtin: remove USE_THE_REPOSITORY for those without the_repository 2024-09-13 14:33:30 -07:00
remote-fd.c builtin: remove USE_THE_REPOSITORY for those without the_repository 2024-09-13 14:33:30 -07:00
remote.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
repack.c Merge branch 'ps/leakfixes-part-7' 2024-10-02 07:46:26 -07:00
replace.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
replay.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
rerere.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
reset.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
rev-list.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
rev-parse.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
revert.c builtin/revert: fix leaking `gpg_sign` and `strategy` config 2024-09-30 11:23:05 -07:00
rm.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
send-pack.c builtin/send-pack: fix leaking list of push options 2024-09-30 11:23:09 -07:00
shortlog.c builtin/shortlog: explicitly set hash algo when there is no repo 2024-10-17 16:10:54 -04:00
show-branch.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
show-index.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
show-ref.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
sparse-checkout.c builtin/sparse-checkout: fix leaking sanitized patterns 2024-11-21 08:23:43 +09:00
stash.c builtin/stash: fix leaking `pathspec_from_file` 2024-09-30 11:23:04 -07:00
stripspace.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
submodule--helper.c submodule: correct remote name with fetch 2024-10-09 10:48:08 -07:00
symbolic-ref.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
tag.c builtin/tag: fix leaking key ID on failure to sign 2024-11-04 22:37:55 -08:00
unpack-file.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
unpack-objects.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
update-index.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
update-ref.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
update-server-info.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
upload-archive.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
upload-pack.c builtin: remove USE_THE_REPOSITORY for those without the_repository 2024-09-13 14:33:30 -07:00
var.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
verify-commit.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
verify-pack.c builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h 2024-09-13 14:32:24 -07:00
verify-tag.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00
worktree.c worktree: link worktrees with relative paths 2024-10-08 11:49:22 -07:00
write-tree.c Merge branch 'jc/pass-repo-to-builtins' 2024-09-23 10:35:09 -07:00