Skip to contentSkip to conversation

Memory leak fixes (pt.10, final)

PATCH Superseded Patrick Steinhardt 5 participants 117 messages Nov 6, 2024 – Nov 25, 2024 Page 1 of 3

lore
Share & tools
lore
#0 lore raw

cover Memory leak fixes (pt.10, final)

Hi,

this is the last part of my series of memory leak fixes. This series goes a bit further than past series:

- Patches 1 to 16 plug remaining memory leaks exposed by our test suite.

- Patches 17 to 21 remove the last remaining UNLEAK() annotations and ultimately remove the macro itself.

- Patch 22 works around a bug in the leak sanitizer itself.

- Patches 23 and 24 drop annotations where leak-free tests pass with the leak sanitizer.

- Patches 25 and 26 unconditionally enable leak checking in all newly added tests and then drop the TEST_PASSES_SANITIZE_LEAK annotation.

So once this series lands, the expectation is that any newly added test needs to be leak free by default. We still have an escape hatch in the form of the SANITIZE_LEAK prerequisite, but patch authors are expected to provide good arguments why their test cannot be made leak free.

This series is built on top of 8f8d6eee53 (The seventh batch, 2024-11-01) with ps/leakfixes-part-9 at c810549be1 (list-objects-filter-options: work around reported leak on error, 2024-11-05) merged into it.

The series has some trivial conflicts with the removed test annotations when merging with seen. There are two topics in-flight that introduce new memory leaks (ds/path-walk and cc/promisor-remote-capability), both of which are fixed by the below patch. I've sent a message in response to the individual commits that introduce the leaks.

Thanks!

Patrick

promisor-remote.c +2 -3
index 06507b2ee1..0a4f7f1188 100644
@@ -424,12 +424,12 @@ static void filter_promisor_remote(struct repository *repo,
 				   const char *info)
 {
 	struct strbuf **remotes;
-	char *accept_str;
+	const char *accept_str;
 	enum accept_promisor accept = ACCEPT_NONE;
 	struct strvec names = STRVEC_INIT;
 	struct strvec urls = STRVEC_INIT;
 
-	if (!git_config_get_string("promisor.acceptfromserver", &accept_str)) {
+	if (!git_config_get_string_tmp("promisor.acceptfromserver", &accept_str)) {
 		if (!accept_str || !*accept_str || !strcasecmp("None", accept_str))
 			accept = ACCEPT_NONE;
 		else if (!strcasecmp("KnownUrl", accept_str))
@@ -486,7 +486,6 @@ static void filter_promisor_remote(struct repository *repo,
 		free(decoded_url);
 	}
 
-	free(accept_str);
 	strvec_clear(&names);
 	strvec_clear(&urls);
 	strbuf_list_free(remotes);
t/helper/test-path-walk.c +1 -1
index 06b103d876..fa3bfe46b5 100644
@@ -85,7 +85,6 @@ int cmd__path_walk(int argc, const char **argv)
 		OPT_END(),
 	};
 
-	initialize_repository(the_repository);
 	setup_git_directory();
 	revs.repo = the_repository;
 
@@ -110,5 +109,6 @@ int cmd__path_walk(int argc, const char **argv)
 	       "tags:%" PRIuMAX "\n",
 	       data.commit_nr, data.tree_nr, data.blob_nr, data.tag_nr);
 
+	release_revisions(&revs);
 	return res;
 }

Patrick Steinhardt (26):
builtin/blame: fix leaking blame entries with --incremental
bisect: fix leaking good/bad terms when reading multipe times
bisect: fix leaking string in handle_bad_merge_base()
bisect: fix leaking current_bad_oid
bisect: fix multiple leaks in bisect_next_all()
bisect: fix leaking commit list items in check_merge_base()
bisect: fix various cases where we leak commit list items
line-log: fix leak when rewriting commit parents
strvec: introduce new strvec_splice() function
git: refactor alias handling to use a struct strvec
git: refactor builtin handling to use a struct strvec
split-index: fix memory leak in move_cache_to_base_index() builtin/sparse-checkout: fix leaking sanitized patterns
help: refactor to not use globals for reading config
help: fix leaking struct cmdnames
help: fix leaking return value from help_unknown_cmd() builtin/help: fix leaks in check_git_cmd() builtin/init-db: fix leaking directory paths builtin/branch: fix leaking sorting options t/helper: fix leaking commit graph in "read-graph" subcommand
git-compat-util: drop UNLEAK() annotation
t5601: work around leak sanitizer issue
t: mark some tests as leak free
t: remove unneeded !SANITIZE_LEAK prerequisites
test-lib: unconditionally enable leak checking
t: remove TEST_PASSES_SANITIZE_LEAK annotations

 bisect.c                                      |  61 ++++++---
 bisect.h                                      |   2 +-
 blame.c                                       |   1 +
 blame.h                                       |   2 +-
 builtin/blame.c                               |  12 +-
 builtin/branch.c                              |  33 +++--
 builtin/clone.c                               |   1 -
 builtin/diff.c                                |   1 -
 builtin/help.c                                |  13 +-
 builtin/init-db.c                             |  30 +++--
 builtin/sparse-checkout.c                     |  61 +++++----
 ci/lib.sh                                     |   1 -
 git-compat-util.h                             |  20 ---
 git.c                                         | 124 +++++++++---------
 help.c                                        |  76 ++++++-----
 help.h                                        |   2 +-
 line-log.c                                    |   1 +
 revision.c                                    |   4 +-
 split-index.c                                 |   6 +-
 strvec.c                                      |  19 +++
 strvec.h                                      |   9 ++
 t/README                                      |  21 ---
 t/helper/test-read-graph.c                    |   3 +-
 t/lib-git-svn.sh                              |   4 -
 t/t0001-init.sh                               |   1 -
 t/t0002-gitfile.sh                            |   1 -
 t/t0003-attributes.sh                         |   1 -
 t/t0004-unwritable.sh                         |   1 -
 t/t0005-signals.sh                            |   1 -
 t/t0006-date.sh                               |   1 -
 t/t0007-git-var.sh                            |   1 -
 t/t0008-ignores.sh                            |   1 -
 t/t0010-racy-git.sh                           |   1 -
 t/t0012-help.sh                               |   1 -
 t/t0013-sha1dc.sh                             |   1 -
 t/t0017-env-helper.sh                         |   1 -
 t/t0018-advice.sh                             |   1 -
 t/t0019-json-writer.sh                        |   1 -
 t/t0020-crlf.sh                               |   1 -
 t/t0021-conversion.sh                         |   1 -
 t/t0022-crlf-rename.sh                        |   1 -
 t/t0023-crlf-am.sh                            |   1 -
 t/t0024-crlf-archive.sh                       |   1 -
 t/t0025-crlf-renormalize.sh                   |   1 -
 t/t0026-eol-config.sh                         |   1 -
 t/t0027-auto-crlf.sh                          |   1 -
 t/t0028-working-tree-encoding.sh              |   1 -
 t/t0029-core-unsetenvvars.sh                  |   1 -
 t/t0030-stripspace.sh                         |   1 -
 t/t0033-safe-directory.sh                     |   1 -
 t/t0035-safe-bare-repository.sh               |   1 -
 t/t0040-parse-options.sh                      |   1 -
 t/t0041-usage.sh                              |   1 -
 t/t0050-filesystem.sh                         |   1 -
 t/t0052-simple-ipc.sh                         |   1 -
 t/t0055-beyond-symlinks.sh                    |   1 -
 t/t0056-git-C.sh                              |   1 -
 t/t0060-path-utils.sh                         |   1 -
 t/t0061-run-command.sh                        |   1 -
 t/t0062-revision-walking.sh                   |   1 -
 t/t0063-string-list.sh                        |   1 -
 t/t0066-dir-iterator.sh                       |   1 -
 t/t0067-parse_pathspec_file.sh                |   1 -
 t/t0068-for-each-repo.sh                      |   1 -
 t/t0070-fundamental.sh                        |   1 -
 t/t0071-sort.sh                               |   1 -
 t/t0080-unit-test-output.sh                   |   1 -
 t/t0081-find-pack.sh                          |   1 -
 t/t0090-cache-tree.sh                         |   1 -
 t/t0091-bugreport.sh                          |   1 -
 t/t0092-diagnose.sh                           |   1 -
 t/t0095-bloom.sh                              |   3 +-
 t/t0100-previous.sh                           |   1 -
 t/t0101-at-syntax.sh                          |   1 -
 t/t0200-gettext-basic.sh                      |   1 -
 t/t0201-gettext-fallbacks.sh                  |   1 -
 t/t0202-gettext-perl.sh                       |   1 -
 t/t0203-gettext-setlocale-sanity.sh           |   1 -
 t/t0204-gettext-reencode-sanity.sh            |   1 -
 t/t0210-trace2-normal.sh                      |   1 -
 t/t0211-trace2-perf.sh                        |   1 -
 t/t0212-trace2-event.sh                       |   1 -
 t/t0300-credentials.sh                        |   1 -
 t/t0301-credential-cache.sh                   |   1 -
 t/t0302-credential-store.sh                   |   1 -
 t/t0303-credential-external.sh                |   1 -
 t/t0410-partial-clone.sh                      |   1 -
 t/t0411-clone-from-partial.sh                 |   1 -
 t/t0450-txt-doc-vs-help.sh                    |   1 -
 t/t0500-progress-display.sh                   |   1 -
 t/t0600-reffiles-backend.sh                   |   1 -
 t/t0601-reffiles-pack-refs.sh                 |   1 -
 t/t0602-reffiles-fsck.sh                      |   1 -
 t/t0610-reftable-basics.sh                    |   1 -
 t/t0611-reftable-httpd.sh                     |   1 -
 t/t0612-reftable-jgit-compatibility.sh        |   1 -
 t/t0613-reftable-write-options.sh             |   1 -
 t/t1000-read-tree-m-3way.sh                   |   1 -
 t/t1001-read-tree-m-2way.sh                   |   1 -
 t/t1002-read-tree-m-u-2way.sh                 |   1 -
 t/t1003-read-tree-prefix.sh                   |   1 -
 t/t1004-read-tree-m-u-wf.sh                   |   1 -
 t/t1005-read-tree-reset.sh                    |   1 -
 t/t1006-cat-file.sh                           |   1 -
 t/t1007-hash-object.sh                        |   1 -
 t/t1008-read-tree-overlay.sh                  |   1 -
 t/t1009-read-tree-new-index.sh                |   1 -
 t/t1010-mktree.sh                             |   1 -
 t/t1011-read-tree-sparse-checkout.sh          |   1 -
 t/t1012-read-tree-df.sh                       |   1 -
 t/t1013-read-tree-submodule.sh                |   1 -
 t/t1014-read-tree-confusing.sh                |   1 -
 t/t1015-read-index-unmerged.sh                |   1 -
 t/t1016-compatObjectFormat.sh                 |   1 -
 t/t1020-subdirectory.sh                       |   1 -
 t/t1021-rerere-in-workdir.sh                  |   1 -
 t/t1022-read-tree-partial-clone.sh            |   1 -
 t/t1050-large.sh                              |   1 -
 t/t1051-large-conversion.sh                   |   1 -
 t/t1060-object-corruption.sh                  |   1 -
 t/t1090-sparse-checkout-scope.sh              |   1 -
 t/t1091-sparse-checkout-builtin.sh            |   1 -
 t/t1092-sparse-checkout-compatibility.sh      |   1 -
 t/t1100-commit-tree-options.sh                |   1 -
 t/t1300-config.sh                             |   1 -
 t/t1301-shared-repo.sh                        |   1 -
 t/t1302-repo-version.sh                       |   1 -
 t/t1303-wacky-config.sh                       |   1 -
 t/t1304-default-acl.sh                        |   1 -
 t/t1305-config-include.sh                     |   1 -
 t/t1306-xdg-files.sh                          |   1 -
 t/t1307-config-blob.sh                        |   1 -
 t/t1308-config-set.sh                         |   1 -
 t/t1309-early-config.sh                       |   1 -
 t/t1310-config-default.sh                     |   1 -
 t/t1350-config-hooks-path.sh                  |   1 -
 t/t1400-update-ref.sh                         |   1 -
 t/t1401-symbolic-ref.sh                       |   1 -
 t/t1402-check-ref-format.sh                   |   1 -
 t/t1403-show-ref.sh                           |   1 -
 t/t1404-update-ref-errors.sh                  |   1 -
 t/t1405-main-ref-store.sh                     |   1 -
 t/t1406-submodule-ref-store.sh                |   1 -
 t/t1407-worktree-ref-store.sh                 |   1 -
 t/t1408-packed-refs.sh                        |   1 -
 t/t1409-avoid-packing-refs.sh                 |   1 -
 t/t1410-reflog.sh                             |   1 -
 t/t1411-reflog-show.sh                        |   1 -
 t/t1412-reflog-loop.sh                        |   1 -
 t/t1413-reflog-detach.sh                      |   1 -
 t/t1414-reflog-walk.sh                        |   1 -
 t/t1415-worktree-refs.sh                      |   1 -
 t/t1416-ref-transaction-hooks.sh              |   1 -
 t/t1417-reflog-updateref.sh                   |   1 -
 t/t1418-reflog-exists.sh                      |   1 -
 t/t1419-exclude-refs.sh                       |   1 -
 t/t1420-lost-found.sh                         |   1 -
 t/t1430-bad-ref-name.sh                       |   1 -
 t/t1450-fsck.sh                               |   1 -
 t/t1451-fsck-buffer.sh                        |   1 -
 t/t1460-refs-migrate.sh                       |   1 -
 t/t1500-rev-parse.sh                          |   1 -
 t/t1501-work-tree.sh                          |   1 -
 t/t1502-rev-parse-parseopt.sh                 |   1 -
 t/t1503-rev-parse-verify.sh                   |   1 -
 t/t1504-ceiling-dirs.sh                       |   1 -
 t/t1505-rev-parse-last.sh                     |   1 -
 t/t1506-rev-parse-diagnosis.sh                |   1 -
 t/t1507-rev-parse-upstream.sh                 |   1 -
 t/t1508-at-combinations.sh                    |   1 -
 t/t1510-repo-setup.sh                         |   1 -
 t/t1511-rev-parse-caret.sh                    |   1 -
 t/t1512-rev-parse-disambiguation.sh           |   1 -
 t/t1513-rev-parse-prefix.sh                   |   1 -
 t/t1514-rev-parse-push.sh                     |   1 -
 t/t1515-rev-parse-outside-repo.sh             |   1 -
 t/t1517-outside-repo.sh                       |   1 -
 t/t1600-index.sh                              |   1 -
 t/t1601-index-bogus.sh                        |   1 -
 t/t1701-racy-split-index.sh                   |   1 -
 t/t1800-hook.sh                               |   1 -
 t/t2000-conflict-when-checking-files-out.sh   |   1 -
 t/t2002-checkout-cache-u.sh                   |   1 -
 t/t2003-checkout-cache-mkdir.sh               |   1 -
 t/t2004-checkout-cache-temp.sh                |   1 -
 t/t2005-checkout-index-symlinks.sh            |   1 -
 t/t2006-checkout-index-basic.sh               |   1 -
 t/t2007-checkout-symlink.sh                   |   1 -
 t/t2008-checkout-subdir.sh                    |   1 -
 t/t2009-checkout-statinfo.sh                  |   1 -
 t/t2010-checkout-ambiguous.sh                 |   1 -
 t/t2011-checkout-invalid-head.sh              |   1 -
 t/t2012-checkout-last.sh                      |   1 -
 t/t2013-checkout-submodule.sh                 |   1 -
 t/t2014-checkout-switch.sh                    |   1 -
 t/t2015-checkout-unborn.sh                    |   1 -
 t/t2016-checkout-patch.sh                     |   1 -
 t/t2017-checkout-orphan.sh                    |   1 -
 t/t2018-checkout-branch.sh                    |   1 -
 t/t2019-checkout-ambiguous-ref.sh             |   1 -
 t/t2020-checkout-detach.sh                    |   1 -
 t/t2021-checkout-overwrite.sh                 |   1 -
 t/t2022-checkout-paths.sh                     |   1 -
 t/t2023-checkout-m.sh                         |   1 -
 t/t2024-checkout-dwim.sh                      |   1 -
 t/t2025-checkout-no-overlay.sh                |   1 -
 t/t2026-checkout-pathspec-file.sh             |   1 -
 t/t2027-checkout-track.sh                     |   1 -
 t/t2030-unresolve-info.sh                     |   1 -
 t/t2050-git-dir-relative.sh                   |   1 -
 t/t2060-switch.sh                             |   1 -
 t/t2070-restore.sh                            |   1 -
 t/t2071-restore-patch.sh                      |   1 -
 t/t2072-restore-pathspec-file.sh              |   1 -
 t/t2080-parallel-checkout-basics.sh           |   1 -
 t/t2081-parallel-checkout-collisions.sh       |   1 -
 t/t2082-parallel-checkout-attributes.sh       |   1 -
 t/t2100-update-cache-badpath.sh               |   1 -
 t/t2101-update-index-reupdate.sh              |   1 -
 t/t2102-update-index-symlinks.sh              |   1 -
 t/t2103-update-index-ignore-missing.sh        |   1 -
 t/t2104-update-index-skip-worktree.sh         |   1 -
 t/t2105-update-index-gitfile.sh               |   1 -
 t/t2106-update-index-assume-unchanged.sh      |   1 -
 t/t2107-update-index-basic.sh                 |   1 -
 t/t2108-update-index-refresh-racy.sh          |   1 -
 t/t2200-add-update.sh                         |   1 -
 t/t2201-add-update-typechange.sh              |   1 -
 t/t2202-add-addremove.sh                      |   1 -
 t/t2203-add-intent.sh                         |   1 -
 t/t2204-add-ignored.sh                        |   1 -
 t/t2205-add-worktree-config.sh                |   1 -
 t/t2300-cd-to-toplevel.sh                     |   1 -
 t/t2400-worktree-add.sh                       |   1 -
 t/t2401-worktree-prune.sh                     |   1 -
 t/t2402-worktree-list.sh                      |   1 -
 t/t2403-worktree-move.sh                      |   1 -
 t/t2404-worktree-config.sh                    |   1 -
 t/t2405-worktree-submodule.sh                 |   1 -
 t/t2406-worktree-repair.sh                    |   1 -
 t/t2407-worktree-heads.sh                     |  17 ++-
 t/t2408-worktree-relative.sh                  |   1 -
 t/t2500-untracked-overwriting.sh              |   1 -
 t/t2501-cwd-empty.sh                          |   1 -
 t/t3000-ls-files-others.sh                    |   1 -
 t/t3001-ls-files-others-exclude.sh            |   1 -
 t/t3002-ls-files-dashpath.sh                  |   1 -
 t/t3003-ls-files-exclude.sh                   |   1 -
 t/t3004-ls-files-basic.sh                     |   1 -
 t/t3005-ls-files-relative.sh                  |   1 -
 t/t3006-ls-files-long.sh                      |   1 -
 t/t3007-ls-files-recurse-submodules.sh        |   1 -
 t/t3008-ls-files-lazy-init-name-hash.sh       |   1 -
 t/t3009-ls-files-others-nonsubmodule.sh       |   1 -
 t/t3010-ls-files-killed-modified.sh           |   1 -
 ...common-prefixes-and-directory-traversal.sh |   1 -
 t/t3012-ls-files-dedup.sh                     |   1 -
 t/t3013-ls-files-format.sh                    |   1 -
 t/t3020-ls-files-error-unmatch.sh             |   1 -
 t/t3040-subprojects-basic.sh                  |   1 -
 t/t3050-subprojects-fetch.sh                  |   1 -
 t/t3060-ls-files-with-tree.sh                 |   1 -
 t/t3070-wildmatch.sh                          |   1 -
 t/t3100-ls-tree-restrict.sh                   |   1 -
 t/t3101-ls-tree-dirname.sh                    |   1 -
 t/t3102-ls-tree-wildcards.sh                  |   1 -
 t/t3103-ls-tree-misc.sh                       |   1 -
 t/t3104-ls-tree-format.sh                     |   1 -
 t/t3105-ls-tree-output.sh                     |   1 -
 t/t3200-branch.sh                             |   1 -
 t/t3201-branch-contains.sh                    |   1 -
 t/t3202-show-branch.sh                        |   1 -
 t/t3203-branch-output.sh                      |   1 -
 t/t3204-branch-name-interpretation.sh         |   1 -
 t/t3205-branch-color.sh                       |   1 -
 t/t3206-range-diff.sh                         |   1 -
 t/t3207-branch-submodule.sh                   |   1 -
 t/t3211-peel-ref.sh                           |   1 -
 t/t3300-funny-names.sh                        |   1 -
 t/t3301-notes.sh                              |   1 -
 t/t3302-notes-index-expensive.sh              |   1 -
 t/t3303-notes-subtrees.sh                     |   1 -
 t/t3304-notes-mixed.sh                        |   1 -
 t/t3305-notes-fanout.sh                       |   1 -
 t/t3306-notes-prune.sh                        |   1 -
 t/t3307-notes-man.sh                          |   1 -
 t/t3308-notes-merge.sh                        |   1 -
 t/t3309-notes-merge-auto-resolve.sh           |   1 -
 t/t3310-notes-merge-manual-resolve.sh         |   1 -
 t/t3311-notes-merge-fanout.sh                 |   1 -
 t/t3320-notes-merge-worktrees.sh              |   1 -
 t/t3321-notes-stripspace.sh                   |   1 -
 t/t3400-rebase.sh                             |   1 -
 t/t3401-rebase-and-am-rename.sh               |   1 -
 t/t3402-rebase-merge.sh                       |   1 -
 t/t3403-rebase-skip.sh                        |   1 -
 t/t3404-rebase-interactive.sh                 |   1 -
 t/t3405-rebase-malformed.sh                   |   1 -
 t/t3406-rebase-message.sh                     |   1 -
 t/t3407-rebase-abort.sh                       |   1 -
 t/t3408-rebase-multi-line.sh                  |   1 -
 t/t3409-rebase-environ.sh                     |   1 -
 t/t3412-rebase-root.sh                        |   1 -
 t/t3413-rebase-hook.sh                        |   1 -
 t/t3415-rebase-autosquash.sh                  |   1 -
 t/t3416-rebase-onto-threedots.sh              |   1 -
 t/t3417-rebase-whitespace-fix.sh              |   1 -
 t/t3418-rebase-continue.sh                    |   1 -
 t/t3419-rebase-patch-id.sh                    |   1 -
 t/t3420-rebase-autostash.sh                   |   1 -
 t/t3421-rebase-topology-linear.sh             |   1 -
 t/t3422-rebase-incompatible-options.sh        |   1 -
 t/t3423-rebase-reword.sh                      |   1 -
 t/t3424-rebase-empty.sh                       |   1 -
 t/t3425-rebase-topology-merges.sh             |   1 -
 t/t3426-rebase-submodule.sh                   |   1 -
 t/t3427-rebase-subtree.sh                     |   1 -
 t/t3428-rebase-signoff.sh                     |   1 -
 t/t3429-rebase-edit-todo.sh                   |   1 -
 t/t3430-rebase-merges.sh                      |   1 -
 t/t3431-rebase-fork-point.sh                  |   1 -
 t/t3432-rebase-fast-forward.sh                |   1 -
 t/t3433-rebase-across-mode-change.sh          |   1 -
 t/t3434-rebase-i18n.sh                        |   1 -
 t/t3435-rebase-gpg-sign.sh                    |   1 -
 t/t3436-rebase-more-options.sh                |   1 -
 t/t3437-rebase-fixup-options.sh               |   1 -
 t/t3438-rebase-broken-files.sh                |   1 -
 t/t3500-cherry.sh                             |   1 -
 t/t3501-revert-cherry-pick.sh                 |   1 -
 t/t3502-cherry-pick-merge.sh                  |   1 -
 t/t3503-cherry-pick-root.sh                   |   1 -
 t/t3504-cherry-pick-rerere.sh                 |   1 -
 t/t3505-cherry-pick-empty.sh                  |   1 -
 t/t3506-cherry-pick-ff.sh                     |   1 -
 t/t3507-cherry-pick-conflict.sh               |   1 -
 t/t3508-cherry-pick-many-commits.sh           |   1 -
 t/t3509-cherry-pick-merge-df.sh               |   1 -
 t/t3510-cherry-pick-sequence.sh               |   1 -
 t/t3511-cherry-pick-x.sh                      |   1 -
 t/t3512-cherry-pick-submodule.sh              |   1 -
 t/t3513-revert-submodule.sh                   |   1 -
 t/t3514-cherry-pick-revert-gpg.sh             |   1 -
 t/t3600-rm.sh                                 |   1 -
 t/t3601-rm-pathspec-file.sh                   |   1 -
 t/t3602-rm-sparse-checkout.sh                 |   1 -
 t/t3650-replay-basics.sh                      |   1 -
 t/t3700-add.sh                                |   1 -
 t/t3701-add-interactive.sh                    |   1 -
 t/t3702-add-edit.sh                           |   1 -
 t/t3703-add-magic-pathspec.sh                 |   1 -
 t/t3704-add-pathspec-file.sh                  |   1 -
 t/t3705-add-sparse-checkout.sh                |   1 -
 t/t3800-mktag.sh                              |   1 -
 t/t3900-i18n-commit.sh                        |   1 -
 t/t3901-i18n-patch.sh                         |   1 -
 t/t3902-quoted.sh                             |   1 -
 t/t3903-stash.sh                              |   1 -
 t/t3904-stash-patch.sh                        |   1 -
 t/t3905-stash-include-untracked.sh            |   1 -
 t/t3906-stash-submodule.sh                    |   1 -
 t/t3907-stash-show-config.sh                  |   1 -
 t/t3908-stash-in-worktree.sh                  |   1 -
 t/t3909-stash-pathspec-file.sh                |   1 -
 t/t3920-crlf-messages.sh                      |   1 -
 t/t4000-diff-format.sh                        |   1 -
 t/t4001-diff-rename.sh                        |   1 -
 t/t4002-diff-basic.sh                         |   1 -
 t/t4003-diff-rename-1.sh                      |   1 -
 t/t4004-diff-rename-symlink.sh                |   1 -
 t/t4005-diff-rename-2.sh                      |   1 -
 t/t4006-diff-mode.sh                          |   1 -
 t/t4007-rename-3.sh                           |   1 -
 t/t4008-diff-break-rewrite.sh                 |   1 -
 t/t4009-diff-rename-4.sh                      |   1 -
 t/t4010-diff-pathspec.sh                      |   1 -
 t/t4011-diff-symlink.sh                       |   1 -
 t/t4012-diff-binary.sh                        |   1 -
 t/t4013-diff-various.sh                       |   1 -
 t/t4014-format-patch.sh                       |   1 -
 t/t4015-diff-whitespace.sh                    |   1 -
 t/t4016-diff-quote.sh                         |   1 -
 t/t4017-diff-retval.sh                        |   1 -
 t/t4018-diff-funcname.sh                      |   1 -
 t/t4019-diff-wserror.sh                       |   1 -
 t/t4020-diff-external.sh                      |   5 +-
 t/t4021-format-patch-numbered.sh              |   1 -
 t/t4022-diff-rewrite.sh                       |   1 -
 t/t4023-diff-rename-typechange.sh             |   1 -
 t/t4024-diff-optimize-common.sh               |   1 -
 t/t4025-hunk-header.sh                        |   1 -
 t/t4026-color.sh                              |   1 -
 t/t4027-diff-submodule.sh                     |   1 -
 t/t4028-format-patch-mime-headers.sh          |   1 -
 t/t4029-diff-trailing-space.sh                |   1 -
 t/t4030-diff-textconv.sh                      |   1 -
 t/t4031-diff-rewrite-binary.sh                |   1 -
 t/t4032-diff-inter-hunk-context.sh            |   1 -
 t/t4033-diff-patience.sh                      |   1 -
 t/t4034-diff-words.sh                         |   1 -
 t/t4035-diff-quiet.sh                         |   1 -
 t/t4036-format-patch-signer-mime.sh           |   1 -
 t/t4037-diff-r-t-dirs.sh                      |   1 -
 t/t4038-diff-combined.sh                      |   1 -
 t/t4039-diff-assume-unchanged.sh              |   1 -
 t/t4040-whitespace-status.sh                  |   1 -
 t/t4041-diff-submodule-option.sh              |   1 -
 t/t4042-diff-textconv-caching.sh              |   1 -
 t/t4043-diff-rename-binary.sh                 |   1 -
 t/t4044-diff-index-unique-abbrev.sh           |   1 -
 t/t4045-diff-relative.sh                      |   1 -
 t/t4046-diff-unmerged.sh                      |   1 -
 t/t4047-diff-dirstat.sh                       |   1 -
 t/t4048-diff-combined-binary.sh               |   1 -
 t/t4049-diff-stat-count.sh                    |   1 -
 t/t4050-diff-histogram.sh                     |   1 -
 t/t4051-diff-function-context.sh              |   1 -
 t/t4052-stat-output.sh                        |   1 -
 t/t4053-diff-no-index.sh                      |   1 -
 t/t4054-diff-bogus-tree.sh                    |   1 -
 t/t4055-diff-context.sh                       |   1 -
 t/t4056-diff-order.sh                         |   1 -
 t/t4057-diff-combined-paths.sh                |   1 -
 t/t4058-diff-duplicates.sh                    |   1 -
 t/t4059-diff-submodule-not-initialized.sh     |   1 -
 t/t4060-diff-submodule-option-diff-format.sh  |   1 -
 t/t4061-diff-indent.sh                        |   1 -
 t/t4062-diff-pickaxe.sh                       |   1 -
 t/t4063-diff-blobs.sh                         |   1 -
 t/t4064-diff-oidfind.sh                       |   1 -
 t/t4065-diff-anchored.sh                      |   1 -
 t/t4066-diff-emit-delay.sh                    |   1 -
 t/t4067-diff-partial-clone.sh                 |   1 -
 t/t4068-diff-symmetric-merge-base.sh          |   1 -
 t/t4069-remerge-diff.sh                       |   1 -
 t/t4100-apply-stat.sh                         |   1 -
 t/t4101-apply-nonl.sh                         |   1 -
 t/t4102-apply-rename.sh                       |   1 -
 t/t4103-apply-binary.sh                       |   1 -
 t/t4104-apply-boundary.sh                     |   1 -
 t/t4105-apply-fuzz.sh                         |   1 -
 t/t4106-apply-stdin.sh                        |   1 -
 t/t4107-apply-ignore-whitespace.sh            |   1 -
 t/t4108-apply-threeway.sh                     |   1 -
 t/t4109-apply-multifrag.sh                    |   1 -
 t/t4110-apply-scan.sh                         |   1 -
 t/t4111-apply-subdir.sh                       |   1 -
 t/t4112-apply-renames.sh                      |   1 -
 t/t4113-apply-ending.sh                       |   1 -
 t/t4114-apply-typechange.sh                   |   1 -
 t/t4115-apply-symlink.sh                      |   1 -
 t/t4116-apply-reverse.sh                      |   1 -
 t/t4117-apply-reject.sh                       |   1 -
 t/t4118-apply-empty-context.sh                |   1 -
 t/t4119-apply-config.sh                       |   1 -
 t/t4120-apply-popt.sh                         |   1 -
 t/t4121-apply-diffs.sh                        |   1 -
 t/t4122-apply-symlink-inside.sh               |   1 -
 t/t4123-apply-shrink.sh                       |   1 -
 t/t4124-apply-ws-rule.sh                      |   1 -
 t/t4125-apply-ws-fuzz.sh                      |   1 -
 t/t4126-apply-empty.sh                        |   1 -
 t/t4127-apply-same-fn.sh                      |   1 -
 t/t4128-apply-root.sh                         |   1 -
 t/t4129-apply-samemode.sh                     |   1 -
 t/t4130-apply-criss-cross-rename.sh           |   1 -
 t/t4131-apply-fake-ancestor.sh                |   1 -
 t/t4132-apply-removal.sh                      |   1 -
 t/t4133-apply-filenames.sh                    |   1 -
 t/t4134-apply-submodule.sh                    |   1 -
 t/t4135-apply-weird-filenames.sh              |   1 -
 t/t4136-apply-check.sh                        |   1 -
 t/t4137-apply-submodule.sh                    |   1 -
 t/t4138-apply-ws-expansion.sh                 |   1 -
 t/t4139-apply-escape.sh                       |   1 -
 t/t4140-apply-ita.sh                          |   1 -
 t/t4141-apply-too-large.sh                    |   1 -
 t/t4150-am.sh                                 |   1 -
 t/t4151-am-abort.sh                           |   1 -
 t/t4152-am-subjects.sh                        |   1 -
 t/t4153-am-resume-override-opts.sh            |   1 -
 t/t4200-rerere.sh                             |   1 -
 t/t4201-shortlog.sh                           |   1 -
 t/t4202-log.sh                                |   1 -
 t/t4203-mailmap.sh                            |   1 -
 t/t4204-patch-id.sh                           |   1 -
 t/t4205-log-pretty-formats.sh                 |   1 -
 t/t4206-log-follow-harder-copies.sh           |   1 -
 t/t4207-log-decoration-colors.sh              |   1 -
 t/t4208-log-magic-pathspec.sh                 |   1 -
 t/t4209-log-pickaxe.sh                        |   1 -
 t/t4210-log-i18n.sh                           |   1 -
 t/t4212-log-corrupt.sh                        |   1 -
 t/t4213-log-tabexpand.sh                      |   1 -
 t/t4214-log-graph-octopus.sh                  |   1 -
 t/t4215-log-skewed-merges.sh                  |   1 -
 t/t4216-log-bloom.sh                          |   1 -
 t/t4217-log-limit.sh                          |   1 -
 t/t4252-am-options.sh                         |   1 -
 t/t4253-am-keep-cr-dos.sh                     |   1 -
 t/t4254-am-corrupt.sh                         |   1 -
 t/t4255-am-submodule.sh                       |   1 -
 t/t4256-am-format-flowed.sh                   |   1 -
 t/t4257-am-interactive.sh                     |   1 -
 t/t4258-am-quoted-cr.sh                       |   1 -
 t/t4300-merge-tree.sh                         |   1 -
 t/t4301-merge-tree-write-tree.sh              |   1 -
 t/t5000-tar-tree.sh                           |   1 -
 t/t5001-archive-attr.sh                       |   1 -
 t/t5002-archive-attr-pattern.sh               |   1 -
 t/t5003-archive-zip.sh                        |   1 -
 t/t5004-archive-corner-cases.sh               |   1 -
 t/t5100-mailinfo.sh                           |   1 -
 t/t5150-request-pull.sh                       |   1 -
 t/t5200-update-server-info.sh                 |   1 -
 t/t5300-pack-object.sh                        |   1 -
 t/t5301-sliding-window.sh                     |   1 -
 t/t5302-pack-index.sh                         |   1 -
 t/t5303-pack-corruption-resilience.sh         |   1 -
 t/t5304-prune.sh                              |   1 -
 t/t5305-include-tag.sh                        |   1 -
 t/t5306-pack-nobase.sh                        |   1 -
 t/t5307-pack-missing-commit.sh                |   1 -
 t/t5308-pack-detect-duplicates.sh             |   1 -
 t/t5309-pack-delta-cycles.sh                  |   1 -
 t/t5310-pack-bitmaps.sh                       |   1 -
 t/t5311-pack-bitmaps-shallow.sh               |   1 -
 t/t5312-prune-corruption.sh                   |   1 -
 t/t5313-pack-bounds-checks.sh                 |   1 -
 t/t5314-pack-cycle-detection.sh               |   1 -
 t/t5315-pack-objects-compression.sh           |   1 -
 t/t5316-pack-delta-depth.sh                   |   1 -
 t/t5317-pack-objects-filter-objects.sh        |   1 -
 t/t5318-commit-graph.sh                       |   1 -
 t/t5319-multi-pack-index.sh                   |   1 -
 t/t5320-delta-islands.sh                      |   1 -
 t/t5321-pack-large-objects.sh                 |   1 -
 t/t5322-pack-objects-sparse.sh                |   1 -
 t/t5323-pack-redundant.sh                     |   1 -
 t/t5324-split-commit-graph.sh                 |   1 -
 t/t5325-reverse-index.sh                      |   1 -
 t/t5326-multi-pack-bitmaps.sh                 |   1 -
 t/t5327-multi-pack-bitmaps-rev.sh             |   1 -
 t/t5328-commit-graph-64bit-time.sh            |   1 -
 t/t5329-pack-objects-cruft.sh                 |   1 -
 t/t5330-no-lazy-fetch-with-commit-graph.sh    |   1 -
 t/t5331-pack-objects-stdin.sh                 |   1 -
 t/t5332-multi-pack-reuse.sh                   |   1 -
 t/t5333-pseudo-merge-bitmaps.sh               |   1 -
 t/t5334-incremental-multi-pack-index.sh       |   1 -
 t/t5351-unpack-large-objects.sh               |   1 -
 t/t5400-send-pack.sh                          |   1 -
 t/t5401-update-hooks.sh                       |   1 -
 t/t5402-post-merge-hook.sh                    |   1 -
 t/t5403-post-checkout-hook.sh                 |   1 -
 t/t5404-tracking-branches.sh                  |   1 -
 t/t5405-send-pack-rewind.sh                   |   1 -
 t/t5406-remote-rejects.sh                     |   1 -
 t/t5407-post-rewrite-hook.sh                  |   1 -
 t/t5408-send-pack-stdin.sh                    |   1 -
 t/t5409-colorize-remote-messages.sh           |   1 -
 t/t5410-receive-pack-alternates.sh            |   1 -
 t/t5411-proc-receive-hook.sh                  |   1 -
 t/t5500-fetch-pack.sh                         |   1 -
 t/t5501-fetch-push-alternates.sh              |   1 -
 t/t5502-quickfetch.sh                         |   1 -
 t/t5503-tagfollow.sh                          |   1 -
 t/t5504-fetch-receive-strict.sh               |   1 -
 t/t5505-remote.sh                             |   1 -
 t/t5506-remote-groups.sh                      |   1 -
 t/t5507-remote-environment.sh                 |   1 -
 t/t5509-fetch-push-namespaces.sh              |   1 -
 t/t5510-fetch.sh                              |   1 -
 t/t5511-refspec.sh                            |   1 -
 t/t5512-ls-remote.sh                          |   1 -
 t/t5513-fetch-track.sh                        |   1 -
 t/t5514-fetch-multiple.sh                     |   1 -
 t/t5515-fetch-merge-logic.sh                  |   1 -
 t/t5516-fetch-push.sh                         |   1 -
 t/t5517-push-mirror.sh                        |   1 -
 t/t5518-fetch-exit-status.sh                  |   1 -
 t/t5519-push-alternates.sh                    |   1 -
 t/t5520-pull.sh                               |   1 -
 t/t5521-pull-options.sh                       |   1 -
 t/t5522-pull-symlink.sh                       |   1 -
 t/t5523-push-upstream.sh                      |   1 -
 t/t5524-pull-msg.sh                           |   1 -
 t/t5525-fetch-tagopt.sh                       |   1 -
 t/t5526-fetch-submodules.sh                   |   1 -
 t/t5527-fetch-odd-refs.sh                     |   1 -
 t/t5528-push-default.sh                       |   1 -
 t/t5529-push-errors.sh                        |   1 -
 t/t5530-upload-pack-error.sh                  |   1 -
 t/t5531-deep-submodule-push.sh                |   1 -
 t/t5532-fetch-proxy.sh                        |   1 -
 t/t5533-push-cas.sh                           |   1 -
 t/t5534-push-signed.sh                        |   1 -
 t/t5535-fetch-push-symref.sh                  |   1 -
 t/t5536-fetch-conflicts.sh                    |   1 -
 t/t5537-fetch-shallow.sh                      |   1 -
 t/t5538-push-shallow.sh                       |   1 -
 t/t5539-fetch-http-shallow.sh                 |   1 -
 t/t5540-http-push-webdav.sh                   |   1 -
 t/t5541-http-push-smart.sh                    |   1 -
 t/t5542-push-http-shallow.sh                  |   1 -
 t/t5543-atomic-push.sh                        |   1 -
 t/t5544-pack-objects-hook.sh                  |   1 -
 t/t5545-push-options.sh                       |   1 -
 t/t5546-receive-limits.sh                     |   1 -
 t/t5547-push-quarantine.sh                    |   1 -
 t/t5548-push-porcelain.sh                     |   1 -
 t/t5549-fetch-push-http.sh                    |   1 -
 t/t5550-http-fetch-dumb.sh                    |   1 -
 t/t5551-http-fetch-smart.sh                   |   1 -
 t/t5552-skipping-fetch-negotiator.sh          |   1 -
 t/t5553-set-upstream.sh                       |   1 -
 t/t5554-noop-fetch-negotiator.sh              |   1 -
 t/t5555-http-smart-common.sh                  |   1 -
 t/t5557-http-get.sh                           |   1 -
 t/t5560-http-backend-noserver.sh              |   1 -
 t/t5561-http-backend.sh                       |   1 -
 t/t5562-http-backend-content-length.sh        |   1 -
 t/t5563-simple-http-auth.sh                   |   1 -
 t/t5564-http-proxy.sh                         |   1 -
 t/t5570-git-daemon.sh                         |   1 -
 t/t5571-pre-push-hook.sh                      |   1 -
 t/t5572-pull-submodule.sh                     |   1 -
 t/t5573-pull-verify-signatures.sh             |   1 -
 t/t5574-fetch-output.sh                       |   1 -
 t/t5580-unc-paths.sh                          |   1 -
 t/t5581-http-curl-verbose.sh                  |   1 -
 t/t5582-fetch-negative-refspec.sh             |   1 -
 t/t5583-push-branches.sh                      |   1 -
 t/t5600-clone-fail-cleanup.sh                 |   1 -
 t/t5601-clone.sh                              |  26 ++--
 t/t5602-clone-remote-exec.sh                  |   1 -
 t/t5603-clone-dirname.sh                      |   1 -
 t/t5604-clone-reference.sh                    |   1 -
 t/t5605-clone-local.sh                        |   1 -
 t/t5606-clone-options.sh                      |   1 -
 t/t5607-clone-bundle.sh                       |   1 -
 t/t5609-clone-branch.sh                       |   1 -
 t/t5610-clone-detached.sh                     |   1 -
 t/t5611-clone-config.sh                       |   1 -
 t/t5612-clone-refspec.sh                      |   1 -
 t/t5613-info-alternate.sh                     |   1 -
 t/t5614-clone-submodules-shallow.sh           |   1 -
 t/t5615-alternate-env.sh                      |   1 -
 t/t5616-partial-clone.sh                      |   1 -
 t/t5617-clone-submodules-remote.sh            |   1 -
 t/t5618-alternate-refs.sh                     |   1 -
 t/t5619-clone-local-ambiguous-transport.sh    |   1 -
 t/t5700-protocol-v1.sh                        |   1 -
 t/t5701-git-serve.sh                          |   1 -
 t/t5702-protocol-v2.sh                        |   1 -
 t/t5703-upload-pack-ref-in-want.sh            |   1 -
 t/t5704-protocol-violations.sh                |   1 -
 t/t5705-session-id-in-capabilities.sh         |   1 -
 t/t5730-protocol-v2-bundle-uri-file.sh        |   1 -
 t/t5731-protocol-v2-bundle-uri-git.sh         |   1 -
 t/t5732-protocol-v2-bundle-uri-http.sh        |   1 -
 t/t5750-bundle-uri-parse.sh                   |   1 -
 t/t5801-remote-helpers.sh                     |   1 -
 t/t5802-connect-helper.sh                     |   1 -
 t/t5810-proto-disable-local.sh                |   1 -
 t/t5811-proto-disable-git.sh                  |   1 -
 t/t5812-proto-disable-http.sh                 |   1 -
 t/t5813-proto-disable-ssh.sh                  |   1 -
 t/t5814-proto-disable-ext.sh                  |   1 -
 t/t5815-submodule-protos.sh                   |   1 -
 t/t5900-repo-selection.sh                     |   1 -
 t/t6000-rev-list-misc.sh                      |   1 -
 t/t6001-rev-list-graft.sh                     |   1 -
 t/t6002-rev-list-bisect.sh                    |   1 -
 t/t6003-rev-list-topo-order.sh                |   1 -
 t/t6004-rev-list-path-optim.sh                |   1 -
 t/t6005-rev-list-count.sh                     |   1 -
 t/t6006-rev-list-format.sh                    |   1 -
 t/t6007-rev-list-cherry-pick-file.sh          |   1 -
 t/t6008-rev-list-submodule.sh                 |   1 -
 t/t6009-rev-list-parent.sh                    |   1 -
 t/t6010-merge-base.sh                         |   1 -
 t/t6011-rev-list-with-bad-commit.sh           |   1 -
 t/t6012-rev-list-simplify.sh                  |   1 -
 t/t6013-rev-list-reverse-parents.sh           |   1 -
 t/t6014-rev-list-all.sh                       |   1 -
 t/t6016-rev-list-graph-simplify-history.sh    |   1 -
 t/t6017-rev-list-stdin.sh                     |   1 -
 t/t6018-rev-list-glob.sh                      |   1 -
 t/t6019-rev-list-ancestry-path.sh             |   1 -
 t/t6020-bundle-misc.sh                        |   1 -
 t/t6021-rev-list-exclude-hidden.sh            |   1 -
 t/t6022-rev-list-missing.sh                   |   1 -
 t/t6040-tracking-info.sh                      |   1 -
 t/t6041-bisect-submodule.sh                   |   1 -
 t/t6050-replace.sh                            |   1 -
 t/t6060-merge-index.sh                        |   1 -
 t/t6100-rev-list-in-order.sh                  |   1 -
 t/t6101-rev-parse-parents.sh                  |   1 -
 t/t6102-rev-list-unexpected-objects.sh        |   1 -
 t/t6110-rev-list-sparse.sh                    |   1 -
 t/t6111-rev-list-treesame.sh                  |   1 -
 t/t6112-rev-list-filters-objects.sh           |   1 -
 t/t6113-rev-list-bitmap-filters.sh            |   1 -
 t/t6114-keep-packs.sh                         |   1 -
 t/t6115-rev-list-du.sh                        |   1 -
 t/t6120-describe.sh                           |   1 -
 t/t6130-pathspec-noglob.sh                    |   1 -
 t/t6131-pathspec-icase.sh                     |   1 -
 t/t6132-pathspec-exclude.sh                   |   1 -
 t/t6133-pathspec-rev-dwim.sh                  |   1 -
 t/t6134-pathspec-in-submodule.sh              |   1 -
 t/t6135-pathspec-with-attrs.sh                |   1 -
 t/t6136-pathspec-in-bare.sh                   |   1 -
 t/t6200-fmt-merge-msg.sh                      |   1 -
 t/t6300-for-each-ref.sh                       |   1 -
 t/t6301-for-each-ref-errors.sh                |   1 -
 t/t6302-for-each-ref-filter.sh                |   1 -
 t/t6400-merge-df.sh                           |   1 -
 t/t6401-merge-criss-cross.sh                  |   1 -
 t/t6402-merge-rename.sh                       |   1 -
 t/t6403-merge-file.sh                         |   1 -
 t/t6404-recursive-merge.sh                    |   1 -
 t/t6405-merge-symlinks.sh                     |   1 -
 t/t6406-merge-attr.sh                         |   1 -
 t/t6407-merge-binary.sh                       |   1 -
 t/t6408-merge-up-to-date.sh                   |   1 -
 t/t6409-merge-subtree.sh                      |   1 -
 t/t6411-merge-filemode.sh                     |   1 -
 t/t6412-merge-large-rename.sh                 |   1 -
 t/t6413-merge-crlf.sh                         |   1 -
 t/t6414-merge-rename-nocruft.sh               |   1 -
 t/t6415-merge-dir-to-symlink.sh               |   1 -
 t/t6416-recursive-corner-cases.sh             |   1 -
 t/t6417-merge-ours-theirs.sh                  |   1 -
 t/t6418-merge-text-auto.sh                    |   1 -
 t/t6421-merge-partial-clone.sh                |   1 -
 t/t6422-merge-rename-corner-cases.sh          |   1 -
 t/t6423-merge-rename-directories.sh           |   1 -
 t/t6424-merge-unrelated-index-changes.sh      |   1 -
 t/t6425-merge-rename-delete.sh                |   1 -
 t/t6426-merge-skip-unneeded-updates.sh        |   1 -
 t/t6427-diff3-conflict-markers.sh             |   1 -
 t/t6428-merge-conflicts-sparse.sh             |   1 -
 t/t6429-merge-sequence-rename-caching.sh      |   1 -
 t/t6430-merge-recursive.sh                    |   1 -
 t/t6431-merge-criscross.sh                    |   1 -
 t/t6432-merge-recursive-space-options.sh      |   1 -
 t/t6433-merge-toplevel.sh                     |   1 -
 t/t6434-merge-recursive-rename-options.sh     |   1 -
 t/t6435-merge-sparse.sh                       |   1 -
 t/t6436-merge-overwrite.sh                    |   1 -
 t/t6437-submodule-merge.sh                    |   1 -
 t/t6438-submodule-directory-file-conflicts.sh |   1 -
 t/t6439-merge-co-error-msgs.sh                |   1 -
 t/t6500-gc.sh                                 |   1 -
 t/t6501-freshen-objects.sh                    |   1 -
 t/t6600-test-reach.sh                         |   1 -
 t/t6700-tree-depth.sh                         |   1 -
 t/t7001-mv.sh                                 |   1 -
 t/t7002-mv-sparse-checkout.sh                 |   1 -
 t/t7003-filter-branch.sh                      |   1 -
 t/t7004-tag.sh                                |   1 -
 t/t7005-editor.sh                             |   1 -
 t/t7006-pager.sh                              |   1 -
 t/t7007-show.sh                               |   1 -
 t/t7008-filter-branch-null-sha1.sh            |   1 -
 t/t7010-setup.sh                              |   1 -
 t/t7011-skip-worktree-reading.sh              |   1 -
 t/t7012-skip-worktree-writing.sh              |   1 -
 t/t7030-verify-tag.sh                         |   1 -
 t/t7031-verify-tag-signed-ssh.sh              |   1 -
 t/t7060-wtstatus.sh                           |   1 -
 t/t7061-wtstatus-ignore.sh                    |   1 -
 t/t7062-wtstatus-ignorecase.sh                |   1 -
 t/t7063-status-untracked-cache.sh             |   1 -
 t/t7064-wtstatus-pv2.sh                       |   1 -
 t/t7101-reset-empty-subdirs.sh                |   1 -
 t/t7102-reset.sh                              |   1 -
 t/t7103-reset-bare.sh                         |   1 -
 t/t7104-reset-hard.sh                         |   1 -
 t/t7105-reset-patch.sh                        |   1 -
 t/t7106-reset-unborn-branch.sh                |   1 -
 t/t7107-reset-pathspec-file.sh                |   1 -
 t/t7110-reset-merge.sh                        |   1 -
 t/t7111-reset-table.sh                        |   1 -
 t/t7112-reset-submodule.sh                    |   1 -
 t/t7113-post-index-change-hook.sh             |   1 -
 t/t7201-co.sh                                 |   1 -
 t/t7300-clean.sh                              |   1 -
 t/t7301-clean-interactive.sh                  |   1 -
 t/t7400-submodule-basic.sh                    |   1 -
 t/t7401-submodule-summary.sh                  |   1 -
 t/t7402-submodule-rebase.sh                   |   1 -
 t/t7403-submodule-sync.sh                     |   1 -
 t/t7406-submodule-update.sh                   |   1 -
 t/t7407-submodule-foreach.sh                  |   1 -
 t/t7408-submodule-reference.sh                |   1 -
 t/t7409-submodule-detached-work-tree.sh       |   1 -
 t/t7411-submodule-config.sh                   |   1 -
 t/t7412-submodule-absorbgitdirs.sh            |   1 -
 t/t7413-submodule-is-active.sh                |   1 -
 t/t7414-submodule-mistakes.sh                 |   1 -
 t/t7416-submodule-dash-url.sh                 |   1 -
 t/t7417-submodule-path-url.sh                 |   1 -
 t/t7418-submodule-sparse-gitmodules.sh        |   1 -
 t/t7419-submodule-set-branch.sh               |   1 -
 t/t7420-submodule-set-url.sh                  |   1 -
 t/t7421-submodule-summary-add.sh              |   1 -
 t/t7422-submodule-output.sh                   |   1 -
 t/t7423-submodule-symlinks.sh                 |   1 -
 t/t7424-submodule-mixed-ref-formats.sh        |   1 -
 t/t7450-bad-git-dotfiles.sh                   |   1 -
 t/t7500-commit-template-squash-signoff.sh     |   1 -
 t/t7501-commit-basic-functionality.sh         |   1 -
 t/t7502-commit-porcelain.sh                   |   1 -
 ...3-pre-commit-and-pre-merge-commit-hooks.sh |   1 -
 t/t7504-commit-msg-hook.sh                    |   1 -
 t/t7505-prepare-commit-msg-hook.sh            |   1 -
 t/t7506-status-submodule.sh                   |   1 -
 t/t7507-commit-verbose.sh                     |   1 -
 t/t7508-status.sh                             |   1 -
 t/t7509-commit-authorship.sh                  |   1 -
 t/t7510-signed-commit.sh                      |   1 -
 t/t7511-status-index.sh                       |   1 -
 t/t7512-status-help.sh                        |   1 -
 t/t7513-interpret-trailers.sh                 |   1 -
 t/t7514-commit-patch.sh                       |   1 -
 t/t7515-status-symlinks.sh                    |   1 -
 t/t7516-commit-races.sh                       |   1 -
 t/t7517-per-repo-email.sh                     |   1 -
 t/t7518-ident-corner-cases.sh                 |   1 -
 t/t7519-status-fsmonitor.sh                   |   1 -
 t/t7520-ignored-hook-warning.sh               |   1 -
 t/t7521-ignored-mode.sh                       |   1 -
 t/t7524-commit-summary.sh                     |   1 -
 t/t7525-status-rename.sh                      |   1 -
 t/t7526-commit-pathspec-file.sh               |   1 -
 t/t7528-signed-commit-ssh.sh                  |   1 -
 t/t7600-merge.sh                              |   1 -
 t/t7601-merge-pull-config.sh                  |   1 -
 t/t7602-merge-octopus-many.sh                 |   1 -
 t/t7603-merge-reduce-heads.sh                 |   1 -
 t/t7604-merge-custom-message.sh               |   1 -
 t/t7605-merge-resolve.sh                      |   1 -
 t/t7606-merge-custom.sh                       |   1 -
 t/t7607-merge-state.sh                        |   1 -
 t/t7608-merge-messages.sh                     |   1 -
 t/t7609-mergetool--lib.sh                     |   1 -
 t/t7610-mergetool.sh                          |   1 -
 t/t7611-merge-abort.sh                        |   1 -
 t/t7612-merge-verify-signatures.sh            |   1 -
 t/t7614-merge-signoff.sh                      |   1 -
 t/t7615-diff-algo-with-mergy-operations.sh    |   1 -
 t/t7700-repack.sh                             |   1 -
 t/t7701-repack-unpack-unreachable.sh          |   1 -
 t/t7702-repack-cyclic-alternate.sh            |   1 -
 t/t7703-repack-geometric.sh                   |   1 -
 t/t7704-repack-cruft.sh                       |   1 -
 t/t7800-difftool.sh                           |   1 -
 t/t7810-grep.sh                               |   1 -
 t/t7811-grep-open.sh                          |   1 -
 t/t7812-grep-icase-non-ascii.sh               |   1 -
 t/t7813-grep-icase-iso.sh                     |   1 -
 t/t7814-grep-recurse-submodules.sh            |   1 -
 t/t7815-grep-binary.sh                        |   1 -
 t/t7816-grep-binary-pattern.sh                |   1 -
 t/t7817-grep-sparse-checkout.sh               |   1 -
 t/t7900-maintenance.sh                        |   1 -
 t/t8001-annotate.sh                           |   1 -
 t/t8002-blame.sh                              |   1 -
 t/t8003-blame-corner-cases.sh                 |   1 -
 t/t8004-blame-with-conflicts.sh               |   1 -
 t/t8005-blame-i18n.sh                         |   1 +
 t/t8006-blame-textconv.sh                     |   1 -
 t/t8007-cat-file-textconv.sh                  |   1 -
 t/t8008-blame-formats.sh                      |   1 -
 t/t8009-blame-vs-topicbranches.sh             |   1 -
 t/t8010-cat-file-filters.sh                   |   1 -
 t/t8011-blame-split-file.sh                   |   1 -
 t/t8012-blame-colors.sh                       |   1 -
 t/t8013-blame-ignore-revs.sh                  |   1 -
 t/t8014-blame-ignore-fuzzy.sh                 |   1 -
 t/t9001-send-email.sh                         |   1 -
 t/t9002-column.sh                             |   1 -
 t/t9003-help-autocorrect.sh                   |   1 -
 t/t9200-git-cvsexportcommit.sh                |   1 -
 t/t9210-scalar.sh                             |   1 -
 t/t9211-scalar-clone.sh                       |   1 -
 t/t9300-fast-import.sh                        |   1 -
 t/t9301-fast-import-notes.sh                  |   1 -
 t/t9302-fast-import-unpack-limit.sh           |   1 -
 t/t9303-fast-import-compression.sh            |   1 -
 t/t9304-fast-import-marks.sh                  |   1 -
 t/t9350-fast-export.sh                        |   1 -
 t/t9351-fast-export-anonymize.sh              |   1 -
 t/t9400-git-cvsserver-server.sh               |   1 -
 t/t9401-git-cvsserver-crlf.sh                 |   1 -
 t/t9402-git-cvsserver-refs.sh                 |   1 -
 t/t9500-gitweb-standalone-no-errors.sh        |   1 -
 t/t9501-gitweb-standalone-http-status.sh      |   1 -
 t/t9502-gitweb-standalone-parse-output.sh     |   1 -
 t/t9600-cvsimport.sh                          |   1 -
 t/t9601-cvsimport-vendor-branch.sh            |   1 -
 t/t9602-cvsimport-branches-tags.sh            |   1 -
 t/t9603-cvsimport-patchsets.sh                |   1 -
 t/t9604-cvsimport-timestamps.sh               |   1 -
 t/t9700-perl-git.sh                           |   1 -
 t/t9800-git-p4-basic.sh                       |   1 -
 t/t9801-git-p4-branch.sh                      |   1 -
 t/t9802-git-p4-filetype.sh                    |   1 -
 t/t9803-git-p4-shell-metachars.sh             |   1 -
 t/t9804-git-p4-label.sh                       |   1 -
 t/t9805-git-p4-skip-submit-edit.sh            |   1 -
 t/t9806-git-p4-options.sh                     |   1 -
 t/t9808-git-p4-chdir.sh                       |   1 -
 t/t9809-git-p4-client-view.sh                 |   1 -
 t/t9810-git-p4-rcs.sh                         |   1 -
 t/t9811-git-p4-label-import.sh                |   1 -
 t/t9812-git-p4-wildcards.sh                   |   1 -
 t/t9813-git-p4-preserve-users.sh              |   1 -
 t/t9814-git-p4-rename.sh                      |   1 -
 t/t9815-git-p4-submit-fail.sh                 |   1 -
 t/t9816-git-p4-locked.sh                      |   1 -
 t/t9817-git-p4-exclude.sh                     |   1 -
 t/t9818-git-p4-block.sh                       |   1 -
 t/t9819-git-p4-case-folding.sh                |   1 -
 t/t9820-git-p4-editor-handling.sh             |   1 -
 t/t9821-git-p4-path-variations.sh             |   1 -
 t/t9822-git-p4-path-encoding.sh               |   1 -
 t/t9823-git-p4-mock-lfs.sh                    |   1 -
 t/t9825-git-p4-handle-utf16-without-bom.sh    |   1 -
 t/t9826-git-p4-keep-empty-commits.sh          |   1 -
 t/t9827-git-p4-change-filetype.sh             |   1 -
 t/t9828-git-p4-map-user.sh                    |   1 -
 t/t9829-git-p4-jobs.sh                        |   1 -
 t/t9830-git-p4-symlink-dir.sh                 |   1 -
 t/t9831-git-p4-triggers.sh                    |   1 -
 t/t9832-unshelve.sh                           |   1 -
 t/t9833-errors.sh                             |   1 -
 t/t9834-git-p4-file-dir-bug.sh                |   1 -
 t/t9835-git-p4-metadata-encoding-python2.sh   |   1 -
 t/t9836-git-p4-metadata-encoding-python3.sh   |   1 -
 t/t9850-shell.sh                              |   1 -
 t/t9901-git-web--browse.sh                    |   1 -
 t/t9902-completion.sh                         |   1 -
 t/t9903-bash-prompt.sh                        |   1 -
 t/test-lib.sh                                 |  72 +---------
 t/unit-tests/strvec.c                         |  65 +++++++++
 usage.c                                       |  15 ---
 950 files changed, 376 insertions(+), 1253 deletions(-)
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#1 lore raw

PATCH 1/26 builtin/blame: fix leaking blame entries with `--incremental`

When passing --incremental to git-blame(1) we exit early by jumping to the cleanup label. But some of the cleanups we perform are handled between the goto and its label, and thus we leak the data.

Move the cleanups after the cleanup label. While at it, move the logic to free the scoreboard's final_buf into cleanup_scoreboard() and drop its const declaration.

---
 blame.c               |  1 +
 blame.h               |  2 +-
 builtin/blame.c       | 12 ++++++------
 t/t8005-blame-i18n.sh |  2 ++
 4 files changed, 10 insertions(+), 7 deletions(-)
blame.c +1 -0
index 90633380cd5..bf69768a7de 100644
@@ -2931,6 +2931,7 @@ void setup_blame_bloom_data(struct blame_scoreboard *sb)
 void cleanup_scoreboard(struct blame_scoreboard *sb)
 {
 	free(sb->lineno);
+	free(sb->final_buf);
 	clear_prio_queue(&sb->commits);
 	oidset_clear(&sb->ignore_list);
 
blame.h +1 -1
index 5b4e47d44c6..3b34be0e5c6 100644
@@ -116,7 +116,7 @@ struct blame_scoreboard {
 	 * Used by many functions to obtain contents of the nth line,
 	 * indexed with scoreboard.lineno[blame_entry.lno].
 	 */
-	const char *final_buf;
+	char *final_buf;
 	unsigned long final_buf_size;
 
 	/* linked list of blames */
builtin/blame.c +6 -6
index e407a22da3b..6a7bb3b0724 100644
@@ -1216,12 +1216,6 @@ int cmd_blame(int argc,
 		output_option &= ~(OUTPUT_COLOR_LINE | OUTPUT_SHOW_AGE_WITH_COLOR);
 
 	output(&sb, output_option);
-	free((void *)sb.final_buf);
-	for (ent = sb.ent; ent; ) {
-		struct blame_entry *e = ent->next;
-		free(ent);
-		ent = e;
-	}
 
 	if (show_stats) {
 		printf("num read blob: %d\n", sb.num_read_blob);
@@ -1230,6 +1224,12 @@ int cmd_blame(int argc,
 	}
 
 cleanup:
+	for (ent = sb.ent; ent; ) {
+		struct blame_entry *e = ent->next;
+		free(ent);
+		ent = e;
+	}
+
 	free(path);
 	cleanup_scoreboard(&sb);
 	release_revisions(&revs);
t/t8005-blame-i18n.sh +2 -0
index 7a1f581c240..fa765aff99a 100755
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='git blame encoding conversion'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if ! test_have_prereq ICONV
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#2 lore raw

PATCH 2/26 bisect: fix leaking good/bad terms when reading multipe times

In reply to Patrick Steinhardt

Even though read_bisect_terms() is declared as assigning string constants, it in fact assigns allocated strings to the read_bad and read_good out parameters. The only callers of this function assign the result to global variables and thus don't have to free them in order to be leak-free. But that changes when executing the function multiple times because we'd then overwrite the previous value and thus make it unreachable.

Fix the function signature and free the previous values. This leak is exposed by t0630, but plugging it does not make the whole test suite pass.

---
 bisect.c   | 14 +++++++++-----
 bisect.h   |  2 +-
 revision.c |  4 ++--
 3 files changed, 12 insertions(+), 8 deletions(-)
bisect.c +9 -5
index 4713226fad4..9c52241050c 100644
@@ -28,8 +28,8 @@ static struct oid_array skipped_revs;
 
 static struct object_id *current_bad_oid;
 
-static const char *term_bad;
-static const char *term_good;
+static char *term_bad;
+static char *term_good;
 
 /* Remember to update object flag allocation in object.h */
 #define COUNTED		(1u<<16)
@@ -985,7 +985,7 @@ static void show_commit(struct commit *commit)
  * We read them and store them to adapt the messages accordingly.
  * Default is bad/good.
  */
-void read_bisect_terms(const char **read_bad, const char **read_good)
+void read_bisect_terms(char **read_bad, char **read_good)
 {
 	struct strbuf str = STRBUF_INIT;
 	const char *filename = git_path_bisect_terms();
@@ -993,16 +993,20 @@ void read_bisect_terms(const char **read_bad, const char **read_good)
 
 	if (!fp) {
 		if (errno == ENOENT) {
-			*read_bad = "bad";
-			*read_good = "good";
+			free(*read_bad);
+			*read_bad = xstrdup("bad");
+			free(*read_good);
+			*read_good = xstrdup("good");
 			return;
 		} else {
 			die_errno(_("could not read file '%s'"), filename);
 		}
 	} else {
 		strbuf_getline_lf(&str, fp);
+		free(*read_bad);
 		*read_bad = strbuf_detach(&str, NULL);
 		strbuf_getline_lf(&str, fp);
+		free(*read_good);
 		*read_good = strbuf_detach(&str, NULL);
 	}
 	strbuf_release(&str);
bisect.h +1 -1
index ee3fd65f3bd..944439bfac7 100644
@@ -75,7 +75,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix);
 
 int estimate_bisect_steps(int all);
 
-void read_bisect_terms(const char **bad, const char **good);
+void read_bisect_terms(char **bad, char **good);
 
 int bisect_clean_state(void);
 
revision.c +2 -2
index 8df75b82249..347dabf7f9a 100644
@@ -51,8 +51,8 @@
 
 volatile show_early_output_fn_t show_early_output;
 
-static const char *term_bad;
-static const char *term_good;
+static char *term_bad;
+static char *term_good;
 
 implement_shared_commit_slab(revision_sources, char *);
 
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#3 lore raw

PATCH 3/26 bisect: fix leaking string in `handle_bad_merge_base()`

In reply to Patrick Steinhardt

When handling a bad merge base we print an error, which includes the set of good revisions joined by spaces. This string is allocated, but never freed.

Fix this memory leak. Note that the local bad_hex varible also looks like a string that we should free. But in fact, oid_to_hex() returns an address to a static variable even though it is declared to return a non-constant string. The function signature is thus quite misleading and really should be fixed, but doing so is outside of the scope of this patch series.

---
 bisect.c | 2 ++
 1 file changed, 2 insertions(+)
bisect.c +2 -0
index 9c52241050c..e9e603877eb 100644
@@ -801,6 +801,8 @@ static enum bisect_error handle_bad_merge_base(void)
 				"between %s and [%s].\n"),
 				bad_hex, term_bad, term_good, bad_hex, good_hex);
 		}
+
+		free(good_hex);
 		return BISECT_MERGE_BASE_CHECK;
 	}
 
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#4 lore raw

PATCH 4/26 bisect: fix leaking `current_bad_oid`

In reply to Patrick Steinhardt

When reading bisect refs we read the reference mapping to the "bad" term into the global current_bad_oid variable. This is an allocated string, but because it is global we never have to free it. This changes though when register_ref() is being called multiple times, at which point we'll overwrite the previous pointer and thus make it unreachable.

Fix this issue by freeing the previous value. This leak is exposed by t6030, but plugging it does not make the whole test suite pass.

---
 bisect.c | 1 +
 1 file changed, 1 insertion(+)
bisect.c +1 -0
index e9e603877eb..6dbc22f84fc 100644
@@ -456,6 +456,7 @@ static int register_ref(const char *refname, const char *referent UNUSED, const
 	strbuf_addstr(&good_prefix, "-");
 
 	if (!strcmp(refname, term_bad)) {
+		free(current_bad_oid);
 		current_bad_oid = xmalloc(sizeof(*current_bad_oid));
 		oidcpy(current_bad_oid, oid);
 	} else if (starts_with(refname, good_prefix.buf)) {
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#5 lore raw

PATCH 5/26 bisect: fix multiple leaks in `bisect_next_all()`

In reply to Patrick Steinhardt

There are multiple leaks in bisect_next_all(). For one we don't free the tried commit list. Second, one of the branches uses a direct return instead of jumping to the cleanup code.

Fix these by freeing the commit list and converting the return to a goto.

---
 bisect.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
bisect.c +3 -2
index 6dbc22f84fc..04e9a63f11c 100644
@@ -1031,7 +1031,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix)
 {
 	struct strvec rev_argv = STRVEC_INIT;
 	struct rev_info revs = REV_INFO_INIT;
-	struct commit_list *tried;
+	struct commit_list *tried = NULL;
 	int reaches = 0, all = 0, nr, steps;
 	enum bisect_error res = BISECT_OK;
 	struct object_id *bisect_rev;
@@ -1098,7 +1098,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix)
 	if (oideq(bisect_rev, current_bad_oid)) {
 		res = error_if_skipped_commits(tried, current_bad_oid);
 		if (res)
-			return res;
+			goto cleanup;
 		printf("%s is the first %s commit\n", oid_to_hex(bisect_rev),
 			term_bad);
 
@@ -1132,6 +1132,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix)
 
 	res = bisect_checkout(bisect_rev, no_checkout);
 cleanup:
+	free_commit_list(tried);
 	release_revisions(&revs);
 	strvec_clear(&rev_argv);
 	return res;
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#6 lore raw

PATCH 6/26 bisect: fix leaking commit list items in `check_merge_base()`

In reply to Patrick Steinhardt

While we free the result commit list at the end of check_merge_base(), we forget to free any items that we have already iterated over. Fix this by using a separate variable to iterate through them.

This leak is exposed by t6030, but plugging it does not make the whole test suite pass.

---
 bisect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bisect.c +2 -2
index 04e9a63f11c..12efcff2e3c 100644
@@ -851,8 +851,8 @@ static enum bisect_error check_merge_bases(int rev_nr, struct commit **rev, int
 				      rev + 1, &result) < 0)
 		exit(128);
 
-	for (; result; result = result->next) {
-		const struct object_id *mb = &result->item->object.oid;
+	for (struct commit_list *l = result; l; l = l->next) {
+		const struct object_id *mb = &l->item->object.oid;
 		if (oideq(mb, current_bad_oid)) {
 			res = handle_bad_merge_base();
 			break;
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#7 lore raw

PATCH 7/26 bisect: fix various cases where we leak commit list items

In reply to Patrick Steinhardt

There are various cases where we leak commit list items because we evict items from the list, but don't free them. Plug those.

---
 bisect.c                    | 35 +++++++++++++++++++++++++++--------
 t/t6030-bisect-porcelain.sh |  1 +
 2 files changed, 28 insertions(+), 8 deletions(-)
bisect.c +27 -8
index 12efcff2e3c..518be70aa3f 100644
@@ -440,11 +440,19 @@ void find_bisection(struct commit_list **commit_list, int *reaches,
 			free_commit_list(list->next);
 			best = list;
 			best->next = NULL;
+		} else {
+			for (p = list; p != best; p = next) {
+				next = p->next;
+				free(p);
+			}
 		}
 		*reaches = weight(best);
+	} else {
+		free_commit_list(*commit_list);
 	}
-	free(weights);
 	*commit_list = best;
+
+	free(weights);
 	clear_commit_weight(&commit_weight);
 }
 
@@ -557,8 +565,11 @@ struct commit_list *filter_skipped(struct commit_list *list,
 			tried = &list->next;
 		} else {
 			if (!show_all) {
-				if (!skipped_first || !*skipped_first)
+				if (!skipped_first || !*skipped_first) {
+					free_commit_list(next);
+					free_commit_list(filtered);
 					return list;
+				}
 			} else if (skipped_first && !*skipped_first) {
 				/* This means we know it's not skipped */
 				*skipped_first = -1;
@@ -614,7 +625,7 @@ static int sqrti(int val)
 
 static struct commit_list *skip_away(struct commit_list *list, int count)
 {
-	struct commit_list *cur, *previous;
+	struct commit_list *cur, *previous, *result = list;
 	int prn, index, i;
 
 	prn = get_prn(count);
@@ -626,15 +637,23 @@ static struct commit_list *skip_away(struct commit_list *list, int count)
 	for (i = 0; cur; cur = cur->next, i++) {
 		if (i == index) {
 			if (!oideq(&cur->item->object.oid, current_bad_oid))
-				return cur;
-			if (previous)
-				return previous;
-			return list;
+				result = cur;
+			else if (previous)
+				result = previous;
+			else
+				result =  list;
+			break;
 		}
 		previous = cur;
 	}
 
-	return list;
+	for (cur = list; cur != result; ) {
+		struct commit_list *next = cur->next;
+		free(cur);
+		cur = next;
+	}
+
+	return result;
 }
 
 static struct commit_list *managed_skipped(struct commit_list *list,
t/t6030-bisect-porcelain.sh +1 -0
index cdc02706404..310affadebe 100755
@@ -9,6 +9,7 @@ exec </dev/null
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 add_line_into_file()
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#8 lore raw

PATCH 8/26 line-log: fix leak when rewriting commit parents

In reply to Patrick Steinhardt

In process_ranges_merge_commit() we try to figure out which of the parents can be blamed for the given line changes. When we figure out that none of the files in the line-log have changed we assign the complete blame to that commit and rewrite the parents of the current commit to only use that single parent.

This is done via commit_list_append(), which is misleadingly _not_ appending to the list of parents. Instead, we overwrite the parents with the blamed parent. This makes us lose track of the old pointers, creating a memory leak.

Fix this issue by freeing the parents before we overwrite them.

---
 line-log.c          | 1 +
 t/t4211-line-log.sh | 1 +
 2 files changed, 2 insertions(+)
line-log.c +1 -0
index bca9bd80407..bc67b75d10d 100644
@@ -1237,6 +1237,7 @@ static int process_ranges_merge_commit(struct rev_info *rev, struct commit *comm
 			 * don't follow any other path in history
 			 */
 			add_line_range(rev, parents[i], cand[i]);
+			free_commit_list(commit->parents);
 			commit_list_append(parents[i], &commit->parents);
 
 			ret = 0;
t/t4211-line-log.sh +1 -0
index 950451cf6a6..1d6dd982a2a 100755
@@ -4,6 +4,7 @@ test_description='test log -L'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup (import history)' '
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#9 lore raw

PATCH 9/26 strvec: introduce new `strvec_splice()` function

In reply to Patrick Steinhardt

Introduce a new strvec_splice() function that can replace a range of strings in the vector with another array of strings. This function will be used in subsequent commits.

---
 strvec.c              | 19 +++++++++++++
 strvec.h              |  9 ++++++
 t/unit-tests/strvec.c | 65 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+)
strvec.c +19 -0
index f712070f574..81075c50cca 100644
@@ -56,6 +56,25 @@ void strvec_pushv(struct strvec *array, const char **items)
 		strvec_push(array, *items);
 }
 
+void strvec_splice(struct strvec *array, size_t pos, size_t len,
+		   const char **replacement, size_t replacement_len)
+{
+	if (pos + len > array->alloc)
+		BUG("range outside of array boundary");
+	if (replacement_len > len)
+		ALLOC_GROW(array->v, array->nr + (replacement_len - len) + 1,
+			   array->alloc);
+	for (size_t i = 0; i < len; i++)
+		free((char *)array->v[pos + i]);
+	if (replacement_len != len) {
+		memmove(array->v + pos + replacement_len, array->v + pos + len,
+			(array->nr - pos - len + 1) * sizeof(char *));
+		array->nr += (replacement_len - len);
+	}
+	for (size_t i = 0; i < replacement_len; i++)
+		array->v[pos + i] = xstrdup(replacement[i]);
+}
+
 const char *strvec_replace(struct strvec *array, size_t idx, const char *replacement)
 {
 	char *to_free;
strvec.h +9 -0
index 4b73c1f092e..4e61cc93369 100644
@@ -67,6 +67,15 @@ void strvec_pushl(struct strvec *, ...);
 /* Push a null-terminated array of strings onto the end of the array. */
 void strvec_pushv(struct strvec *, const char **);
 
+/*
+ * Replace `len` values starting at `pos` with the provided replacement
+ * strings. If `len` is zero this is effectively an insert at the given `pos`.
+ * If `replacement_len` is zero this is effectively a delete of `len` items
+ * starting at `pos`.
+ */
+void strvec_splice(struct strvec *array, size_t pos, size_t len,
+		   const char **replacement, size_t replacement_len);
+
 /**
  * Replace the value at the given index with a new value. The index must be
  * valid. Returns a pointer to the inserted value.
t/unit-tests/strvec.c +65 -0

71 lines not on this page · raw message

Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#10 lore raw

Re: [PATCH 09/26] strvec: introduce new `strvec_splice()` function

Quoted 16 lines · Patrick Steinhardt

Introduce a new strvec_splice() function that can replace a range of strings in the vector with another array of strings. This function will be used in subsequent commits.

---
 strvec.c              | 19 +++++++++++++
 strvec.h              |  9 ++++++
 t/unit-tests/strvec.c | 65 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+)
strvec.c +0 -0
index f712070f574..81075c50cca 100644

strvec.c void strvec_pushv(struct strvec *array, const char **items) · line 60

Quoted 5 lines
strvec.c +2 -0
@@ -56,6 +56,25 @@ void strvec_pushv(struct strvec *array, const char **items)
 		strvec_push(array, *items);
 }
 
+void strvec_splice(struct strvec *array, size_t pos, size_t len,
+		   const char **replacement, size_t replacement_len)

There's nothing wrong with replacement_len, but it has caught my attention because in other strvec APIs we use null-terminated arrays.

Quoted 119 lines
strvec.c +17 -0
+{
+	if (pos + len > array->alloc)
+		BUG("range outside of array boundary");
+	if (replacement_len > len)
+		ALLOC_GROW(array->v, array->nr + (replacement_len - len) + 1,
+			   array->alloc);
+	for (size_t i = 0; i < len; i++)
+		free((char *)array->v[pos + i]);
+	if (replacement_len != len) {
+		memmove(array->v + pos + replacement_len, array->v + pos + len,
+			(array->nr - pos - len + 1) * sizeof(char *));
+		array->nr += (replacement_len - len);
+	}
+	for (size_t i = 0; i < replacement_len; i++)
+		array->v[pos + i] = xstrdup(replacement[i]);
+}
+
 const char *strvec_replace(struct strvec *array, size_t idx, const char *replacement)
 {
 	char *to_free;
strvec.h +9 -0
index 4b73c1f092e..4e61cc93369 100644
@@ -67,6 +67,15 @@ void strvec_pushl(struct strvec *, ...);
 /* Push a null-terminated array of strings onto the end of the array. */
 void strvec_pushv(struct strvec *, const char **);
 
+/*
+ * Replace `len` values starting at `pos` with the provided replacement
+ * strings. If `len` is zero this is effectively an insert at the given `pos`.
+ * If `replacement_len` is zero this is effectively a delete of `len` items
+ * starting at `pos`.
+ */
+void strvec_splice(struct strvec *array, size_t pos, size_t len,
+		   const char **replacement, size_t replacement_len);
+
 /**
  * Replace the value at the given index with a new value. The index must be
  * valid. Returns a pointer to the inserted value.
t/unit-tests/strvec.c +65 -0
index bf4c0cb172e..855b6023371 100644
@@ -88,6 +88,71 @@ void test_strvec__pushv(void)
 	strvec_clear(&vec);
 }
 
+void test_strvec__splice_with_same_size_replacement(void)
+{
+	struct strvec vec = STRVEC_INIT;
+	const char *replacement[] = { "1" };
+
+	strvec_pushl(&vec, "foo", "bar", "baz", NULL);
+	strvec_splice(&vec, 1, 1, replacement, ARRAY_SIZE(replacement));
+	check_strvec(&vec, "foo", "1", "baz", NULL);
+	strvec_clear(&vec);
+}
+
+void test_strvec__splice_with_smaller_replacement(void)
+{
+	struct strvec vec = STRVEC_INIT;
+	const char *replacement[] = { "1" };
+
+	strvec_pushl(&vec, "foo", "bar", "baz", NULL);
+	strvec_splice(&vec, 1, 2, replacement, ARRAY_SIZE(replacement));
+	check_strvec(&vec, "foo", "1", NULL);
+	strvec_clear(&vec);
+}
+
+void test_strvec__splice_with_bigger_replacement(void)
+{
+	struct strvec vec = STRVEC_INIT;
+	const char *replacement[] = { "1", "2", "3" };
+
+	strvec_pushl(&vec, "foo", "bar", "baz", NULL);
+	strvec_splice(&vec, 0, 2, replacement, ARRAY_SIZE(replacement));
+	check_strvec(&vec, "1", "2", "3", "baz", NULL);
+	strvec_clear(&vec);
+}
+
+void test_strvec__splice_with_empty_replacement(void)
+{
+	struct strvec vec = STRVEC_INIT;
+
+	strvec_pushl(&vec, "foo", "bar", "baz", NULL);
+	strvec_splice(&vec, 0, 2, NULL, 0);
+	check_strvec(&vec, "baz", NULL);
+	strvec_clear(&vec);
+}
+
+void test_strvec__splice_with_empty_original(void)
+{
+	struct strvec vec = STRVEC_INIT;
+	const char *replacement[] = { "1", "2" };
+
+	strvec_pushl(&vec, "foo", "bar", "baz", NULL);
+	strvec_splice(&vec, 1, 0, replacement, ARRAY_SIZE(replacement));
+	check_strvec(&vec, "foo", "1", "2", "bar", "baz", NULL);
+	strvec_clear(&vec);
+}
+
+void test_strvec__splice_at_tail(void)
+{
+	struct strvec vec = STRVEC_INIT;
+	const char *replacement[] = { "1", "2" };
+
+	strvec_pushl(&vec, "foo", "bar", NULL);
+	strvec_splice(&vec, 2, 0, replacement, ARRAY_SIZE(replacement));
+	check_strvec(&vec, "foo", "bar", "1", "2", NULL);
+	strvec_clear(&vec);
+}
+
 void test_strvec__replace_at_head(void)
 {
 	struct strvec vec = STRVEC_INIT;
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#11 lore raw

Re: [PATCH 09/26] strvec: introduce new `strvec_splice()` function

Quoted 20 lines · Rubén Justo
Quoted 19 lines · Patrick Steinhardt

Introduce a new strvec_splice() function that can replace a range of strings in the vector with another array of strings. This function will be used in subsequent commits.

---
 strvec.c              | 19 +++++++++++++
 strvec.h              |  9 ++++++
 t/unit-tests/strvec.c | 65 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+)
strvec.c +0 -0
index f712070f574..81075c50cca 100644
@@ -56,6 +56,25 @@ void strvec_pushv(struct strvec *array, const char **items)
 		strvec_push(array, *items);
 }
 
Quoted 5 lines

strvec.c void strvec_pushv(struct strvec *array, const char **items) · line 60

Quoted 2 lines
strvec.c +2 -0
+void strvec_splice(struct strvec *array, size_t pos, size_t len,
+		   const char **replacement, size_t replacement_len)

There's nothing wrong with replacement_len, but it has caught my attention because in other strvec APIs we use null-terminated arrays.

Fair enough, but we do end up using this in a subsequent patch, as you discovered in the next patch. So I'll leave this as-is.

Patrick

#12 lore raw

PATCH 10/26 git: refactor alias handling to use a `struct strvec`

In reply to Patrick Steinhardt

In handle_alias() we use both argcp and argv as in-out parameters. Callers mostly pass through the static array from main(), but once we handle an alias we replace it with an allocated array that may contain some allocated strings. Callers do not handle this scenario at all and thus leak memory.

We could in theory handle the lifetime of argv in a hacky fashion by letting callers free it in case they see that an alias was handled. But while that would likely work, we still wouldn't be able to easily handle the lifetime of strings referenced by argv.

Refactor the code to instead use a struct strvec, which effectively removes the need for us to manually track lifetimes.

---
 git.c            | 58 ++++++++++++++++++++++++++----------------------
 t/t0014-alias.sh |  1 +
 2 files changed, 33 insertions(+), 26 deletions(-)
git.c +32 -26
index c2c1b8e22c2..88356afe5fb 100644
@@ -362,7 +362,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 	return (*argv) - orig_argv;
 }
 
-static int handle_alias(int *argcp, const char ***argv)
+static int handle_alias(struct strvec *args)
 {
 	int envchanged = 0, ret = 0, saved_errno = errno;
 	int count, option_count;
@@ -370,10 +370,10 @@ static int handle_alias(int *argcp, const char ***argv)
 	const char *alias_command;
 	char *alias_string;
 
-	alias_command = (*argv)[0];
+	alias_command = args->v[0];
 	alias_string = alias_lookup(alias_command);
 	if (alias_string) {
-		if (*argcp > 1 && !strcmp((*argv)[1], "-h"))
+		if (args->nr > 1 && !strcmp(args->v[1], "-h"))
 			fprintf_ln(stderr, _("'%s' is aliased to '%s'"),
 				   alias_command, alias_string);
 		if (alias_string[0] == '!') {
@@ -390,7 +390,7 @@ static int handle_alias(int *argcp, const char ***argv)
 			child.wait_after_clean = 1;
 			child.trace2_child_class = "shell_alias";
 			strvec_push(&child.args, alias_string + 1);
-			strvec_pushv(&child.args, (*argv) + 1);
+			strvec_pushv(&child.args, args->v + 1);
 
 			trace2_cmd_alias(alias_command, child.args.v);
 			trace2_cmd_name("_run_shell_alias_");
@@ -423,15 +423,13 @@ static int handle_alias(int *argcp, const char ***argv)
 		trace_argv_printf(new_argv,
 				  "trace: alias expansion: %s =>",
 				  alias_command);
-
-		REALLOC_ARRAY(new_argv, count + *argcp);
-		/* insert after command name */
-		COPY_ARRAY(new_argv + count, *argv + 1, *argcp);
-
 		trace2_cmd_alias(alias_command, new_argv);
 
-		*argv = new_argv;
-		*argcp += count - 1;
+		/* Replace the alias with the new arguments. */
+		strvec_splice(args, 0, 1, new_argv, count);
+
+		free(alias_string);
+		free(new_argv);
 
 		ret = 1;
 	}
@@ -800,10 +798,10 @@ static void execv_dashed_external(const char **argv)
 		exit(128);
 }
 
-static int run_argv(int *argcp, const char ***argv)
+static int run_argv(struct strvec *args)
 {
 	int done_alias = 0;
-	struct string_list cmd_list = STRING_LIST_INIT_NODUP;
+	struct string_list cmd_list = STRING_LIST_INIT_DUP;
 	struct string_list_item *seen;
 
 	while (1) {
@@ -817,8 +815,8 @@ static int run_argv(int *argcp, const char ***argv)
 		 * process.
 		 */
 		if (!done_alias)
-			handle_builtin(*argcp, *argv);
-		else if (get_builtin(**argv)) {
+			handle_builtin(args->nr, args->v);
+		else if (get_builtin(args->v[0])) {
 			struct child_process cmd = CHILD_PROCESS_INIT;
 			int i;
 
@@ -834,8 +832,8 @@ static int run_argv(int *argcp, const char ***argv)
 			commit_pager_choice();
 
 			strvec_push(&cmd.args, "git");
-			for (i = 0; i < *argcp; i++)
-				strvec_push(&cmd.args, (*argv)[i]);
+			for (i = 0; i < args->nr; i++)
+				strvec_push(&cmd.args, args->v[i]);
 
 			trace_argv_printf(cmd.args.v, "trace: exec:");
 
@@ -850,13 +848,13 @@ static int run_argv(int *argcp, const char ***argv)
 			i = run_command(&cmd);
 			if (i >= 0 || errno != ENOENT)
 				exit(i);
-			die("could not execute builtin %s", **argv);
+			die("could not execute builtin %s", args->v[0]);
 		}
 
 		/* .. then try the external ones */
-		execv_dashed_external(*argv);
+		execv_dashed_external(args->v);
 
-		seen = unsorted_string_list_lookup(&cmd_list, *argv[0]);
+		seen = unsorted_string_list_lookup(&cmd_list, args->v[0]);
 		if (seen) {
 			int i;
 			struct strbuf sb = STRBUF_INIT;
@@ -873,14 +871,14 @@ static int run_argv(int *argcp, const char ***argv)
 			      " not terminate:%s"), cmd_list.items[0].string, sb.buf);
 		}
 
-		string_list_append(&cmd_list, *argv[0]);
+		string_list_append(&cmd_list, args->v[0]);
 
 		/*
 		 * It could be an alias -- this works around the insanity
 		 * of overriding "git log" with "git show" by having
 		 * alias.log = show
 		 */
-		if (!handle_alias(argcp, argv))
+		if (!handle_alias(args))
 			break;
 		done_alias = 1;
 	}
@@ -892,6 +890,7 @@ static int run_argv(int *argcp, const char ***argv)
 
 int cmd_main(int argc, const char **argv)
 {
+	struct strvec args = STRVEC_INIT;
 	const char *cmd;
 	int done_help = 0;
 
@@ -951,25 +950,32 @@ int cmd_main(int argc, const char **argv)
 	 */
 	setup_path();
 
+	for (size_t i = 0; i < argc; i++)
+		strvec_push(&args, argv[i]);
+
 	while (1) {
-		int was_alias = run_argv(&argc, &argv);
+		int was_alias = run_argv(&args);
 		if (errno != ENOENT)
 			break;
 		if (was_alias) {
 			fprintf(stderr, _("expansion of alias '%s' failed; "
 					  "'%s' is not a git command\n"),
-				cmd, argv[0]);
+				cmd, args.v[0]);
+			strvec_clear(&args);
 			exit(1);
 		}
 		if (!done_help) {
-			cmd = argv[0] = help_unknown_cmd(cmd);
+			strvec_replace(&args, 0, help_unknown_cmd(cmd));
+			cmd = args.v[0];
 			done_help = 1;
-		} else
+		} else {
 			break;
+		}
 	}
 
 	fprintf(stderr, _("failed to run command '%s': %s\n"),
 		cmd, strerror(errno));
+	strvec_clear(&args);
 
 	return 1;
 }
t/t0014-alias.sh +1 -0
index 854d59ec58c..2a6f39ad9c8 100755
@@ -2,6 +2,7 @@
 
 test_description='git command aliasing'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'nested aliases - internal execution' '
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#13 lore raw

Re: [PATCH 10/26] git: refactor alias handling to use a `struct strvec`

Quoted 60 lines · Patrick Steinhardt

In handle_alias() we use both argcp and argv as in-out parameters. Callers mostly pass through the static array from main(), but once we handle an alias we replace it with an allocated array that may contain some allocated strings. Callers do not handle this scenario at all and thus leak memory.

We could in theory handle the lifetime of argv in a hacky fashion by letting callers free it in case they see that an alias was handled. But while that would likely work, we still wouldn't be able to easily handle the lifetime of strings referenced by argv.

Refactor the code to instead use a struct strvec, which effectively removes the need for us to manually track lifetimes.

---
 git.c            | 58 ++++++++++++++++++++++++++----------------------
 t/t0014-alias.sh |  1 +
 2 files changed, 33 insertions(+), 26 deletions(-)
git.c +4 -5
index c2c1b8e22c2..88356afe5fb 100644
@@ -362,7 +362,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 	return (*argv) - orig_argv;
 }
 
-static int handle_alias(int *argcp, const char ***argv)
+static int handle_alias(struct strvec *args)
 {
 	int envchanged = 0, ret = 0, saved_errno = errno;
 	int count, option_count;
@@ -370,10 +370,10 @@ static int handle_alias(int *argcp, const char ***argv)
 	const char *alias_command;
 	char *alias_string;
 
-	alias_command = (*argv)[0];
+	alias_command = args->v[0];
 	alias_string = alias_lookup(alias_command);
 	if (alias_string) {
-		if (*argcp > 1 && !strcmp((*argv)[1], "-h"))
+		if (args->nr > 1 && !strcmp(args->v[1], "-h"))
 			fprintf_ln(stderr, _("'%s' is aliased to '%s'"),
 				   alias_command, alias_string);
 		if (alias_string[0] == '!') {
@@ -390,7 +390,7 @@ static int handle_alias(int *argcp, const char ***argv)
 			child.wait_after_clean = 1;
 			child.trace2_child_class = "shell_alias";
 			strvec_push(&child.args, alias_string + 1);
-			strvec_pushv(&child.args, (*argv) + 1);
+			strvec_pushv(&child.args, args->v + 1);
 
 			trace2_cmd_alias(alias_command, child.args.v);
 			trace2_cmd_name("_run_shell_alias_");
@@ -423,15 +423,13 @@ static int handle_alias(int *argcp, const char ***argv)
 		trace_argv_printf(new_argv,
 				  "trace: alias expansion: %s =>",
 				  alias_command);
-

git.c static int handle_alias(int *argcp, const char ***argv) · line 429

Quoted 10 lines
git.c +2 -6
-		REALLOC_ARRAY(new_argv, count + *argcp);
-		/* insert after command name */
-		COPY_ARRAY(new_argv + count, *argv + 1, *argcp);
-
 		trace2_cmd_alias(alias_command, new_argv);
 
-		*argv = new_argv;
-		*argcp += count - 1;
+		/* Replace the alias with the new arguments. */
+		strvec_splice(args, 0, 1, new_argv, count);

So, we take advantage here of the replacement_len argument for strvec_splice(). OK.

Quoted 135 lines
git.c +26 -15
+
+		free(alias_string);
+		free(new_argv);
 
 		ret = 1;
 	}
@@ -800,10 +798,10 @@ static void execv_dashed_external(const char **argv)
 		exit(128);
 }
 
-static int run_argv(int *argcp, const char ***argv)
+static int run_argv(struct strvec *args)
 {
 	int done_alias = 0;
-	struct string_list cmd_list = STRING_LIST_INIT_NODUP;
+	struct string_list cmd_list = STRING_LIST_INIT_DUP;
 	struct string_list_item *seen;
 
 	while (1) {
@@ -817,8 +815,8 @@ static int run_argv(int *argcp, const char ***argv)
 		 * process.
 		 */
 		if (!done_alias)
-			handle_builtin(*argcp, *argv);
-		else if (get_builtin(**argv)) {
+			handle_builtin(args->nr, args->v);
+		else if (get_builtin(args->v[0])) {
 			struct child_process cmd = CHILD_PROCESS_INIT;
 			int i;
 
@@ -834,8 +832,8 @@ static int run_argv(int *argcp, const char ***argv)
 			commit_pager_choice();
 
 			strvec_push(&cmd.args, "git");
-			for (i = 0; i < *argcp; i++)
-				strvec_push(&cmd.args, (*argv)[i]);
+			for (i = 0; i < args->nr; i++)
+				strvec_push(&cmd.args, args->v[i]);
 
 			trace_argv_printf(cmd.args.v, "trace: exec:");
 
@@ -850,13 +848,13 @@ static int run_argv(int *argcp, const char ***argv)
 			i = run_command(&cmd);
 			if (i >= 0 || errno != ENOENT)
 				exit(i);
-			die("could not execute builtin %s", **argv);
+			die("could not execute builtin %s", args->v[0]);
 		}
 
 		/* .. then try the external ones */
-		execv_dashed_external(*argv);
+		execv_dashed_external(args->v);
 
-		seen = unsorted_string_list_lookup(&cmd_list, *argv[0]);
+		seen = unsorted_string_list_lookup(&cmd_list, args->v[0]);
 		if (seen) {
 			int i;
 			struct strbuf sb = STRBUF_INIT;
@@ -873,14 +871,14 @@ static int run_argv(int *argcp, const char ***argv)
 			      " not terminate:%s"), cmd_list.items[0].string, sb.buf);
 		}
 
-		string_list_append(&cmd_list, *argv[0]);
+		string_list_append(&cmd_list, args->v[0]);
 
 		/*
 		 * It could be an alias -- this works around the insanity
 		 * of overriding "git log" with "git show" by having
 		 * alias.log = show
 		 */
-		if (!handle_alias(argcp, argv))
+		if (!handle_alias(args))
 			break;
 		done_alias = 1;
 	}
@@ -892,6 +890,7 @@ static int run_argv(int *argcp, const char ***argv)
 
 int cmd_main(int argc, const char **argv)
 {
+	struct strvec args = STRVEC_INIT;
 	const char *cmd;
 	int done_help = 0;
 
@@ -951,25 +950,32 @@ int cmd_main(int argc, const char **argv)
 	 */
 	setup_path();
 
+	for (size_t i = 0; i < argc; i++)
+		strvec_push(&args, argv[i]);
+
 	while (1) {
-		int was_alias = run_argv(&argc, &argv);
+		int was_alias = run_argv(&args);
 		if (errno != ENOENT)
 			break;
 		if (was_alias) {
 			fprintf(stderr, _("expansion of alias '%s' failed; "
 					  "'%s' is not a git command\n"),
-				cmd, argv[0]);
+				cmd, args.v[0]);
+			strvec_clear(&args);
 			exit(1);
 		}
 		if (!done_help) {
-			cmd = argv[0] = help_unknown_cmd(cmd);
+			strvec_replace(&args, 0, help_unknown_cmd(cmd));
+			cmd = args.v[0];
 			done_help = 1;
-		} else
+		} else {
 			break;
+		}
 	}
 
 	fprintf(stderr, _("failed to run command '%s': %s\n"),
 		cmd, strerror(errno));
+	strvec_clear(&args);
 
 	return 1;
 }
t/t0014-alias.sh +1 -0
index 854d59ec58c..2a6f39ad9c8 100755
@@ -2,6 +2,7 @@
 
 test_description='git command aliasing'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'nested aliases - internal execution' '
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#14 lore raw

PATCH 11/26 git: refactor builtin handling to use a `struct strvec`

In reply to Patrick Steinhardt

Similar as with the preceding commit, handle_builtin() does not properly track lifetimes of the argv array and its strings. As it may end up modifying the array this can lead to memory leaks in case it contains allocated strings.

Refactor the function to use a struct strvec instead.

---
 git.c                  | 66 ++++++++++++++++++++----------------------
 t/t0211-trace2-perf.sh |  2 +-
 2 files changed, 32 insertions(+), 36 deletions(-)
git.c +31 -35
index 88356afe5fb..159dd45b082 100644
@@ -696,63 +696,57 @@ void load_builtin_commands(const char *prefix, struct cmdnames *cmds)
 }
 
 #ifdef STRIP_EXTENSION
-static void strip_extension(const char **argv)
+static void strip_extension(struct strvec *args)
 {
 	size_t len;
 
-	if (strip_suffix(argv[0], STRIP_EXTENSION, &len))
-		argv[0] = xmemdupz(argv[0], len);
+	if (strip_suffix(args->v[0], STRIP_EXTENSION, &len)) {
+		char *stripped = xmemdupz(args->v[0], len);
+		strvec_replace(args, 0, stripped);
+		free(stripped);
+	}
 }
 #else
 #define strip_extension(cmd)
 #endif
 
-static void handle_builtin(int argc, const char **argv)
+static void handle_builtin(struct strvec *args)
 {
-	struct strvec args = STRVEC_INIT;
-	const char **argv_copy = NULL;
 	const char *cmd;
 	struct cmd_struct *builtin;
 
-	strip_extension(argv);
-	cmd = argv[0];
+	strip_extension(args);
+	cmd = args->v[0];
 
 	/* Turn "git cmd --help" into "git help --exclude-guides cmd" */
-	if (argc > 1 && !strcmp(argv[1], "--help")) {
-		int i;
-
-		argv[1] = argv[0];
-		argv[0] = cmd = "help";
-
-		for (i = 0; i < argc; i++) {
-			strvec_push(&args, argv[i]);
-			if (!i)
-				strvec_push(&args, "--exclude-guides");
-		}
+	if (args->nr > 1 && !strcmp(args->v[1], "--help")) {
+		const char *exclude_guides_arg[] = { "--exclude-guides" };
+
+		strvec_replace(args, 1, args->v[0]);
+		strvec_replace(args, 0, "help");
+		cmd = "help";
+		strvec_splice(args, 2, 0, exclude_guides_arg,
+			      ARRAY_SIZE(exclude_guides_arg));
+	}
 
-		argc++;
+	builtin = get_builtin(cmd);
+	if (builtin) {
+		const char **argv_copy = NULL;
+		int ret;
 
 		/*
 		 * `run_builtin()` will modify the argv array, so we need to
 		 * create a shallow copy such that we can free all of its
 		 * strings.
 		 */
-		CALLOC_ARRAY(argv_copy, argc + 1);
-		COPY_ARRAY(argv_copy, args.v, argc);
+		if (args->nr)
+			DUP_ARRAY(argv_copy, args->v, args->nr + 1);
 
-		argv = argv_copy;
-	}
-
-	builtin = get_builtin(cmd);
-	if (builtin) {
-		int ret = run_builtin(builtin, argc, argv, the_repository);
-		strvec_clear(&args);
+		ret = run_builtin(builtin, args->nr, argv_copy, the_repository);
+		strvec_clear(args);
 		free(argv_copy);
 		exit(ret);
 	}
-
-	strvec_clear(&args);
-	free(argv_copy);
 }
 
 static void execv_dashed_external(const char **argv)
@@ -815,7 +809,7 @@ static int run_argv(struct strvec *args)
 		 * process.
 		 */
 		if (!done_alias)
-			handle_builtin(args->nr, args->v);
+			handle_builtin(args);
 		else if (get_builtin(args->v[0])) {
 			struct child_process cmd = CHILD_PROCESS_INIT;
 			int i;
@@ -916,8 +910,10 @@ int cmd_main(int argc, const char **argv)
 	 * that one cannot handle it.
 	 */
 	if (skip_prefix(cmd, "git-", &cmd)) {
-		argv[0] = cmd;
-		handle_builtin(argc, argv);
+		strvec_push(&args, cmd);
+		strvec_pushv(&args, argv + 1);
+		handle_builtin(&args);
+		strvec_clear(&args);
 		die(_("cannot handle %s as a builtin"), cmd);
 	}
 
t/t0211-trace2-perf.sh +1 -1
index dddc130560b..91260ce97e5 100755
@@ -2,7 +2,7 @@
 
 test_description='test trace2 facility (perf target)'
 
-TEST_PASSES_SANITIZE_LEAK=false
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#15 lore raw

PATCH 12/26 split-index: fix memory leak in `move_cache_to_base_index()`

In reply to Patrick Steinhardt

In move_cache_to_base_index() we move the index cache of the main index into the split index, which is used when writing a shared index. But we don't release the old split index base in case we already had a split index before this operation, which can thus leak memory.

Plug the leak by releasing the previous base.

---
 split-index.c          | 6 +++++-
 t/t1700-split-index.sh | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)
split-index.c +5 -1
index 120c8190b18..cfbc773e6cd 100644
@@ -97,7 +97,11 @@ void move_cache_to_base_index(struct index_state *istate)
 		mem_pool_combine(istate->ce_mem_pool, istate->split_index->base->ce_mem_pool);
 	}
 
-	ALLOC_ARRAY(si->base, 1);
+	if (si->base)
+		release_index(si->base);
+	else
+		ALLOC_ARRAY(si->base, 1);
+
 	index_state_init(si->base, istate->repo);
 	si->base->version = istate->version;
 	/* zero timestamp disables racy test in ce_write_index() */
t/t1700-split-index.sh +1 -0
index ac4a5b2734c..2625ac44889 100755
@@ -5,6 +5,7 @@ test_description='split index mode tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # We need total control of index splitting here
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#16 lore raw

Re: [PATCH 12/26] split-index: fix memory leak in `move_cache_to_base_index()`

Quoted 18 lines · Patrick Steinhardt

In move_cache_to_base_index() we move the index cache of the main index into the split index, which is used when writing a shared index. But we don't release the old split index base in case we already had a split index before this operation, which can thus leak memory.

Plug the leak by releasing the previous base.

---
 split-index.c          | 6 +++++-
 t/t1700-split-index.sh | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)
split-index.c +0 -0
index 120c8190b18..cfbc773e6cd 100644

split-index.c void move_cache_to_base_index(struct index_state *istate) · line 105

Quoted 10 lines
split-index.c +5 -1
@@ -97,7 +97,11 @@ void move_cache_to_base_index(struct index_state *istate)
 		mem_pool_combine(istate->ce_mem_pool, istate->split_index->base->ce_mem_pool);
 	}
 
-	ALLOC_ARRAY(si->base, 1);
+	if (si->base)
+		release_index(si->base);
+	else
+		ALLOC_ARRAY(si->base, 1);
+
 	index_state_init(si->base, istate->repo);

This change sounded strange to me. It's like:

   if (si-base) {
   	discard_index(si->base);
   } else {
   	ALLOC_ARRAY(si->base, 1);
   	index_state_init(si->base, istate->repo);
   }

OK.

Quoted 17 lines
split-index.c +0 -0
 	si->base->version = istate->version;
 	/* zero timestamp disables racy test in ce_write_index() */
t/t1700-split-index.sh +1 -0
index ac4a5b2734c..2625ac44889 100755
@@ -5,6 +5,7 @@ test_description='split index mode tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # We need total control of index splitting here
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#17 lore raw

PATCH 13/26 builtin/sparse-checkout: fix leaking sanitized patterns

In reply to Patrick Steinhardt

Both git sparse-checkout add and git sparse-checkout set accept a list of additional directories or patterns. These get massaged via calls to sanitize_paths(), which may end up modifying the passed-in array by updating its pointers to be prefixed paths. This allocates memory that we never free.

Refactor the code to instead use a struct strvec, which makes it way easier for us to track the lifetime correctly. The couple of extra memory allocations likely do not matter as we only ever populate it with command line arguments.

---
 builtin/sparse-checkout.c | 61 +++++++++++++++++++++++++--------------
 1 file changed, 39 insertions(+), 22 deletions(-)
builtin/sparse-checkout.c +39 -22
index 49aedc1de81..698d93a9ec5 100644
@@ -669,7 +669,7 @@ static void add_patterns_literal(int argc, const char **argv,
 	add_patterns_from_input(pl, argc, argv, use_stdin ? stdin : NULL);
 }
 
-static int modify_pattern_list(int argc, const char **argv, int use_stdin,
+static int modify_pattern_list(struct strvec *args, int use_stdin,
 			       enum modify_type m)
 {
 	int result;
@@ -679,13 +679,13 @@ static int modify_pattern_list(int argc, const char **argv, int use_stdin,
 	switch (m) {
 	case ADD:
 		if (core_sparse_checkout_cone)
-			add_patterns_cone_mode(argc, argv, pl, use_stdin);
+			add_patterns_cone_mode(args->nr, args->v, pl, use_stdin);
 		else
-			add_patterns_literal(argc, argv, pl, use_stdin);
+			add_patterns_literal(args->nr, args->v, pl, use_stdin);
 		break;
 
 	case REPLACE:
-		add_patterns_from_input(pl, argc, argv,
+		add_patterns_from_input(pl, args->nr, args->v,
 					use_stdin ? stdin : NULL);
 		break;
 	}
@@ -706,12 +706,12 @@ static int modify_pattern_list(int argc, const char **argv, int use_stdin,
 	return result;
 }
 
-static void sanitize_paths(int argc, const char **argv,
+static void sanitize_paths(struct strvec *args,
 			   const char *prefix, int skip_checks)
 {
 	int i;
 
-	if (!argc)
+	if (!args->nr)
 		return;
 
 	if (prefix && *prefix && core_sparse_checkout_cone) {
@@ -721,8 +721,11 @@ static void sanitize_paths(int argc, const char **argv,
 		 */
 		int prefix_len = strlen(prefix);
 
-		for (i = 0; i < argc; i++)
-			argv[i] = prefix_path(prefix, prefix_len, argv[i]);
+		for (i = 0; i < args->nr; i++) {
+			char *prefixed_path = prefix_path(prefix, prefix_len, args->v[i]);
+			strvec_replace(args, i, prefixed_path);
+			free(prefixed_path);
+		}
 	}
 
 	if (skip_checks)
@@ -732,20 +735,20 @@ static void sanitize_paths(int argc, const char **argv,
 		die(_("please run from the toplevel directory in non-cone mode"));
 
 	if (core_sparse_checkout_cone) {
-		for (i = 0; i < argc; i++) {
-			if (argv[i][0] == '/')
+		for (i = 0; i < args->nr; i++) {
+			if (args->v[i][0] == '/')
 				die(_("specify directories rather than patterns (no leading slash)"));
-			if (argv[i][0] == '!')
+			if (args->v[i][0] == '!')
 				die(_("specify directories rather than patterns.  If your directory starts with a '!', pass --skip-checks"));
-			if (strpbrk(argv[i], "*?[]"))
+			if (strpbrk(args->v[i], "*?[]"))
 				die(_("specify directories rather than patterns.  If your directory really has any of '*?[]\\' in it, pass --skip-checks"));
 		}
 	}
 
-	for (i = 0; i < argc; i++) {
+	for (i = 0; i < args->nr; i++) {
 		struct cache_entry *ce;
 		struct index_state *index = the_repository->index;
-		int pos = index_name_pos(index, argv[i], strlen(argv[i]));
+		int pos = index_name_pos(index, args->v[i], strlen(args->v[i]));
 
 		if (pos < 0)
 			continue;
@@ -754,9 +757,9 @@ static void sanitize_paths(int argc, const char **argv,
 			continue;
 
 		if (core_sparse_checkout_cone)
-			die(_("'%s' is not a directory; to treat it as a directory anyway, rerun with --skip-checks"), argv[i]);
+			die(_("'%s' is not a directory; to treat it as a directory anyway, rerun with --skip-checks"), args->v[i]);
 		else
-			warning(_("pass a leading slash before paths such as '%s' if you want a single file (see NON-CONE PROBLEMS in the git-sparse-checkout manual)."), argv[i]);
+			warning(_("pass a leading slash before paths such as '%s' if you want a single file (see NON-CONE PROBLEMS in the git-sparse-checkout manual)."), args->v[i]);
 	}
 }
 
@@ -780,6 +783,8 @@ static int sparse_checkout_add(int argc, const char **argv, const char *prefix)
 			 N_("read patterns from standard in")),
 		OPT_END(),
 	};
+	struct strvec patterns = STRVEC_INIT;
+	int ret;
 
 	setup_work_tree();
 	if (!core_apply_sparse_checkout)
@@ -791,9 +796,14 @@ static int sparse_checkout_add(int argc, const char **argv, const char *prefix)
 			     builtin_sparse_checkout_add_options,
 			     builtin_sparse_checkout_add_usage, 0);
 
-	sanitize_paths(argc, argv, prefix, add_opts.skip_checks);
+	for (int i = 0; i < argc; i++)
+		strvec_push(&patterns, argv[i]);
+	sanitize_paths(&patterns, prefix, add_opts.skip_checks);
 
-	return modify_pattern_list(argc, argv, add_opts.use_stdin, ADD);
+	ret = modify_pattern_list(&patterns, add_opts.use_stdin, ADD);
+
+	strvec_clear(&patterns);
+	return ret;
 }
 
 static char const * const builtin_sparse_checkout_set_usage[] = {
@@ -826,6 +836,8 @@ static int sparse_checkout_set(int argc, const char **argv, const char *prefix)
 			   PARSE_OPT_NONEG),
 		OPT_END(),
 	};
+	struct strvec patterns = STRVEC_INIT;
+	int ret;
 
 	setup_work_tree();
 	repo_read_index(the_repository);
@@ -846,13 +858,18 @@ static int sparse_checkout_set(int argc, const char **argv, const char *prefix)
 	 * top-level directory (much as 'init' would do).
 	 */
 	if (!core_sparse_checkout_cone && !set_opts.use_stdin && argc == 0) {
-		argv = default_patterns;
-		argc = default_patterns_nr;
+		for (int i = 0; i < default_patterns_nr; i++)
+			strvec_push(&patterns, default_patterns[i]);
 	} else {
-		sanitize_paths(argc, argv, prefix, set_opts.skip_checks);
+		for (int i = 0; i < argc; i++)
+			strvec_push(&patterns, argv[i]);
+		sanitize_paths(&patterns, prefix, set_opts.skip_checks);
 	}
 
-	return modify_pattern_list(argc, argv, set_opts.use_stdin, REPLACE);
+	ret = modify_pattern_list(&patterns, set_opts.use_stdin, REPLACE);
+
+	strvec_clear(&patterns);
+	return ret;
 }
 
 static char const * const builtin_sparse_checkout_reapply_usage[] = {
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#18 lore raw

PATCH 14/26 help: refactor to not use globals for reading config

In reply to Patrick Steinhardt

We're reading the "help.autocorrect" and "alias.*" configuration into global variables, which makes it hard to manage their lifetime correctly. Refactor the code to use a struct instead.

---
 help.c | 47 ++++++++++++++++++++++++-----------------------
 1 file changed, 24 insertions(+), 23 deletions(-)
help.c +24 -23
index 4ad4ebdd2cf..8794f81db9b 100644
@@ -546,8 +546,10 @@ int is_in_cmdlist(struct cmdnames *c, const char *s)
 	return 0;
 }
 
-static int autocorrect;
-static struct cmdnames aliases;
+struct help_unknown_cmd_config {
+	int autocorrect;
+	struct cmdnames aliases;
+};
 
 #define AUTOCORRECT_PROMPT (-3)
 #define AUTOCORRECT_NEVER (-2)
@@ -555,28 +557,29 @@ static struct cmdnames aliases;
 
 static int git_unknown_cmd_config(const char *var, const char *value,
 				  const struct config_context *ctx,
-				  void *cb UNUSED)
+				  void *cb)
 {
+	struct help_unknown_cmd_config *cfg = cb;
 	const char *p;
 
 	if (!strcmp(var, "help.autocorrect")) {
 		if (!value)
 			return config_error_nonbool(var);
 		if (!strcmp(value, "never")) {
-			autocorrect = AUTOCORRECT_NEVER;
+			cfg->autocorrect = AUTOCORRECT_NEVER;
 		} else if (!strcmp(value, "immediate")) {
-			autocorrect = AUTOCORRECT_IMMEDIATELY;
+			cfg->autocorrect = AUTOCORRECT_IMMEDIATELY;
 		} else if (!strcmp(value, "prompt")) {
-			autocorrect = AUTOCORRECT_PROMPT;
+			cfg->autocorrect = AUTOCORRECT_PROMPT;
 		} else {
 			int v = git_config_int(var, value, ctx->kvi);
-			autocorrect = (v < 0)
+			cfg->autocorrect = (v < 0)
 				? AUTOCORRECT_IMMEDIATELY : v;
 		}
 	}
 	/* Also use aliases for command lookup */
 	if (skip_prefix(var, "alias.", &p))
-		add_cmdname(&aliases, p, strlen(p));
+		add_cmdname(&cfg->aliases, p, strlen(p));
 
 	return 0;
 }
@@ -611,30 +614,28 @@ static const char bad_interpreter_advice[] =
 
 const char *help_unknown_cmd(const char *cmd)
 {
+	struct help_unknown_cmd_config cfg = { 0 };
 	int i, n, best_similarity = 0;
-	struct cmdnames main_cmds, other_cmds;
+	struct cmdnames main_cmds = { 0 };
+	struct cmdnames other_cmds = { 0 };
 	struct cmdname_help *common_cmds;
 
-	memset(&main_cmds, 0, sizeof(main_cmds));
-	memset(&other_cmds, 0, sizeof(other_cmds));
-	memset(&aliases, 0, sizeof(aliases));
-
-	read_early_config(the_repository, git_unknown_cmd_config, NULL);
+	read_early_config(the_repository, git_unknown_cmd_config, &cfg);
 
 	/*
 	 * Disable autocorrection prompt in a non-interactive session
 	 */
-	if ((autocorrect == AUTOCORRECT_PROMPT) && (!isatty(0) || !isatty(2)))
-		autocorrect = AUTOCORRECT_NEVER;
+	if ((cfg.autocorrect == AUTOCORRECT_PROMPT) && (!isatty(0) || !isatty(2)))
+		cfg.autocorrect = AUTOCORRECT_NEVER;
 
-	if (autocorrect == AUTOCORRECT_NEVER) {
+	if (cfg.autocorrect == AUTOCORRECT_NEVER) {
 		fprintf_ln(stderr, _("git: '%s' is not a git command. See 'git --help'."), cmd);
 		exit(1);
 	}
 
 	load_command_list("git-", &main_cmds, &other_cmds);
 
-	add_cmd_list(&main_cmds, &aliases);
+	add_cmd_list(&main_cmds, &cfg.aliases);
 	add_cmd_list(&main_cmds, &other_cmds);
 	QSORT(main_cmds.names, main_cmds.cnt, cmdname_compare);
 	uniq(&main_cmds);
@@ -693,7 +694,7 @@ const char *help_unknown_cmd(const char *cmd)
 		     n++)
 			; /* still counting */
 	}
-	if (autocorrect && n == 1 && SIMILAR_ENOUGH(best_similarity)) {
+	if (cfg.autocorrect && n == 1 && SIMILAR_ENOUGH(best_similarity)) {
 		const char *assumed = main_cmds.names[0]->name;
 		main_cmds.names[0] = NULL;
 		cmdnames_release(&main_cmds);
@@ -701,12 +702,12 @@ const char *help_unknown_cmd(const char *cmd)
 			   _("WARNING: You called a Git command named '%s', "
 			     "which does not exist."),
 			   cmd);
-		if (autocorrect == AUTOCORRECT_IMMEDIATELY)
+		if (cfg.autocorrect == AUTOCORRECT_IMMEDIATELY)
 			fprintf_ln(stderr,
 				   _("Continuing under the assumption that "
 				     "you meant '%s'."),
 				   assumed);
-		else if (autocorrect == AUTOCORRECT_PROMPT) {
+		else if (cfg.autocorrect == AUTOCORRECT_PROMPT) {
 			char *answer;
 			struct strbuf msg = STRBUF_INIT;
 			strbuf_addf(&msg, _("Run '%s' instead [y/N]? "), assumed);
@@ -719,8 +720,8 @@ const char *help_unknown_cmd(const char *cmd)
 			fprintf_ln(stderr,
 				   _("Continuing in %0.1f seconds, "
 				     "assuming that you meant '%s'."),
-				   (float)autocorrect/10.0, assumed);
-			sleep_millisec(autocorrect * 100);
+				   (float)cfg.autocorrect/10.0, assumed);
+			sleep_millisec(cfg.autocorrect * 100);
 		}
 		return assumed;
 	}
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#19 lore raw

PATCH 15/26 help: fix leaking `struct cmdnames`

In reply to Patrick Steinhardt

We're populating multiple struct cmdnames, but don't ever free them. Create a common exit path where we do so.

Note that this also requires us to use FREE_AND_NULL() when freeing cmdnames::names, as we may otherwise try to free it multiple times.

---
 help.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)
help.c +17 -7
index 8794f81db9b..51adc530d7a 100644
@@ -169,7 +169,7 @@ void cmdnames_release(struct cmdnames *cmds)
 	int i;
 	for (i = 0; i < cmds->cnt; ++i)
 		free(cmds->names[i]);
-	free(cmds->names);
+	FREE_AND_NULL(cmds->names);
 	cmds->cnt = 0;
 	cmds->alloc = 0;
 }
@@ -619,6 +619,7 @@ const char *help_unknown_cmd(const char *cmd)
 	struct cmdnames main_cmds = { 0 };
 	struct cmdnames other_cmds = { 0 };
 	struct cmdname_help *common_cmds;
+	const char *assumed = NULL;
 
 	read_early_config(the_repository, git_unknown_cmd_config, &cfg);
 
@@ -630,7 +631,7 @@ const char *help_unknown_cmd(const char *cmd)
 
 	if (cfg.autocorrect == AUTOCORRECT_NEVER) {
 		fprintf_ln(stderr, _("git: '%s' is not a git command. See 'git --help'."), cmd);
-		exit(1);
+		goto out;
 	}
 
 	load_command_list("git-", &main_cmds, &other_cmds);
@@ -695,7 +696,7 @@ const char *help_unknown_cmd(const char *cmd)
 			; /* still counting */
 	}
 	if (cfg.autocorrect && n == 1 && SIMILAR_ENOUGH(best_similarity)) {
-		const char *assumed = main_cmds.names[0]->name;
+		assumed = main_cmds.names[0]->name;
 		main_cmds.names[0] = NULL;
 		cmdnames_release(&main_cmds);
 		fprintf_ln(stderr,
@@ -714,8 +715,10 @@ const char *help_unknown_cmd(const char *cmd)
 			answer = git_prompt(msg.buf, PROMPT_ECHO);
 			strbuf_release(&msg);
 			if (!(starts_with(answer, "y") ||
-			      starts_with(answer, "Y")))
-				exit(1);
+			      starts_with(answer, "Y"))) {
+				assumed = NULL;
+				goto out;
+			}
 		} else {
 			fprintf_ln(stderr,
 				   _("Continuing in %0.1f seconds, "
@@ -723,7 +726,8 @@ const char *help_unknown_cmd(const char *cmd)
 				   (float)cfg.autocorrect/10.0, assumed);
 			sleep_millisec(cfg.autocorrect * 100);
 		}
-		return assumed;
+
+		goto out;
 	}
 
 	fprintf_ln(stderr, _("git: '%s' is not a git command. See 'git --help'."), cmd);
@@ -738,7 +742,13 @@ const char *help_unknown_cmd(const char *cmd)
 			fprintf(stderr, "\t%s\n", main_cmds.names[i]->name);
 	}
 
-	exit(1);
+out:
+	cmdnames_release(&cfg.aliases);
+	cmdnames_release(&main_cmds);
+	cmdnames_release(&other_cmds);
+	if (!assumed)
+		exit(1);
+	return assumed;
 }
 
 void get_version_info(struct strbuf *buf, int show_build_options)
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#20 lore raw

Re: [PATCH 15/26] help: fix leaking `struct cmdnames`

Quoted 33 lines · Patrick Steinhardt

We're populating multiple struct cmdnames, but don't ever free them. Create a common exit path where we do so.

Note that this also requires us to use FREE_AND_NULL() when freeing cmdnames::names, as we may otherwise try to free it multiple times.

---
 help.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)
help.c +2 -1
index 8794f81db9b..51adc530d7a 100644
@@ -169,7 +169,7 @@ void cmdnames_release(struct cmdnames *cmds)
 	int i;
 	for (i = 0; i < cmds->cnt; ++i)
 		free(cmds->names[i]);
-	free(cmds->names);
+	FREE_AND_NULL(cmds->names);
 	cmds->cnt = 0;
 	cmds->alloc = 0;
 }
@@ -619,6 +619,7 @@ const char *help_unknown_cmd(const char *cmd)
 	struct cmdnames main_cmds = { 0 };
 	struct cmdnames other_cmds = { 0 };
 	struct cmdname_help *common_cmds;
+	const char *assumed = NULL;
 
 	read_early_config(the_repository, git_unknown_cmd_config, &cfg);
 

help.c const char *help_unknown_cmd(const char *cmd) · line 634

Quoted 5 lines
help.c +1 -1
@@ -630,7 +631,7 @@ const char *help_unknown_cmd(const char *cmd)
 
 	if (cfg.autocorrect == AUTOCORRECT_NEVER) {
 		fprintf_ln(stderr, _("git: '%s' is not a git command. See 'git --help'."), cmd);
-		exit(1);
+		goto out;

We haven't set a value for assumed at this point, so it's NULL, and in the new exit path we exit(1) when assumed is NULL. OK.

However, I think we don't need this change. And keeping the exit(1) close to the error message seems like a good idea. Perhaps, in another series, we could change it to die().

Quoted 13 lines
help.c +1 -1
 	}
 
 	load_command_list("git-", &main_cmds, &other_cmds);
@@ -695,7 +696,7 @@ const char *help_unknown_cmd(const char *cmd)
 			; /* still counting */
 	}
 	if (cfg.autocorrect && n == 1 && SIMILAR_ENOUGH(best_similarity)) {
-		const char *assumed = main_cmds.names[0]->name;
+		assumed = main_cmds.names[0]->name;
 		main_cmds.names[0] = NULL;
 		cmdnames_release(&main_cmds);
 		fprintf_ln(stderr,

help.c const char *help_unknown_cmd(const char *cmd) · line 721

Quoted 9 lines
help.c +4 -2
@@ -714,8 +715,10 @@ const char *help_unknown_cmd(const char *cmd)
 			answer = git_prompt(msg.buf, PROMPT_ECHO);
 			strbuf_release(&msg);
 			if (!(starts_with(answer, "y") ||
-			      starts_with(answer, "Y")))
-				exit(1);
+			      starts_with(answer, "Y"))) {
+				assumed = NULL;
+				goto out;
+			}

OK. But, as above, I don't think we need to change this either.

help.c const char *help_unknown_cmd(const char *cmd) · line 730

Quoted 10 lines
help.c +2 -1
 		} else {
 			fprintf_ln(stderr,
 				   _("Continuing in %0.1f seconds, "
@@ -723,7 +726,8 @@ const char *help_unknown_cmd(const char *cmd)
 				   (float)cfg.autocorrect/10.0, assumed);
 			sleep_millisec(cfg.autocorrect * 100);
 		}
-		return assumed;
+
+		goto out;

OK.

Quoted 5 lines
help.c +0 -0
 	}
 
 	fprintf_ln(stderr, _("git: '%s' is not a git command. See 'git --help'."), cmd);
@@ -738,7 +742,13 @@ const char *help_unknown_cmd(const char *cmd)
 			fprintf(stderr, "\t%s\n", main_cmds.names[i]->name);

help.c const char *help_unknown_cmd(const char *cmd) · line 751

Quoted 10 lines
help.c +7 -1
 	}
 
-	exit(1);
+out:
+	cmdnames_release(&cfg.aliases);
+	cmdnames_release(&main_cmds);
+	cmdnames_release(&other_cmds);
+	if (!assumed)
+		exit(1);
+	return assumed;

OK.

Quoted 6 lines
help.c +0 -0
 }
 
 void get_version_info(struct strbuf *buf, int show_build_options)
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#21 lore raw

Re: [PATCH 15/26] help: fix leaking `struct cmdnames`

Quoted 11 lines · Rubén Justo

help.c const char *help_unknown_cmd(const char *cmd) · line 634

Quoted 6 lines · Patrick Steinhardt
help.c +1 -1
@@ -630,7 +631,7 @@ const char *help_unknown_cmd(const char *cmd)
 
 	if (cfg.autocorrect == AUTOCORRECT_NEVER) {
 		fprintf_ln(stderr, _("git: '%s' is not a git command. See 'git --help'."), cmd);
-		exit(1);
+		goto out;

We haven't set a value for assumed at this point, so it's NULL, and in the new exit path we exit(1) when assumed is NULL. OK.

Quoted 3 lines

However, I think we don't need this change. And keeping the exit(1) close to the error message seems like a good idea. Perhaps, in another series, we could change it to die().

Yeah, good point indeed. I'll adapt this.

Patrick

#22 lore raw

PATCH 16/26 help: fix leaking return value from `help_unknown_cmd()`

In reply to Patrick Steinhardt

While help_unknown_cmd() would usually die on an unknown command, it instead returns an autocorrected command when "help.autocorrect" is set. But while the function is declared to return a string constant, it actually returns an allocated string in that case. Callers thus aren't aware that they have to free the string, leading to a memory leak.

Fix the function return type to be non-constant and free the returned value at its only callsite.

Note that we cannot simply take ownership of main_cmds.names[0]->name and then eventually free it. This is because the struct cmdname is using a flex array to allocate the name, so the name pointer points into the middle of the structure and thus cannot be freed.

---
 git.c  |  4 +++-
 help.c | 11 +++++------
 help.h |  2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)
git.c +3 -1
index 159dd45b082..46b3c740c5d 100644
@@ -961,7 +961,9 @@ int cmd_main(int argc, const char **argv)
 			exit(1);
 		}
 		if (!done_help) {
-			strvec_replace(&args, 0, help_unknown_cmd(cmd));
+			char *assumed = help_unknown_cmd(cmd);
+			strvec_replace(&args, 0, assumed);
+			free(assumed);
 			cmd = args.v[0];
 			done_help = 1;
 		} else {
help.c +5 -6
index 51adc530d7a..0290aba9f38 100644
@@ -612,14 +612,14 @@ static const char bad_interpreter_advice[] =
 	N_("'%s' appears to be a git command, but we were not\n"
 	"able to execute it. Maybe git-%s is broken?");
 
-const char *help_unknown_cmd(const char *cmd)
+char *help_unknown_cmd(const char *cmd)
 {
 	struct help_unknown_cmd_config cfg = { 0 };
 	int i, n, best_similarity = 0;
 	struct cmdnames main_cmds = { 0 };
 	struct cmdnames other_cmds = { 0 };
 	struct cmdname_help *common_cmds;
-	const char *assumed = NULL;
+	char *assumed = NULL;
 
 	read_early_config(the_repository, git_unknown_cmd_config, &cfg);
 
@@ -696,9 +696,8 @@ const char *help_unknown_cmd(const char *cmd)
 			; /* still counting */
 	}
 	if (cfg.autocorrect && n == 1 && SIMILAR_ENOUGH(best_similarity)) {
-		assumed = main_cmds.names[0]->name;
-		main_cmds.names[0] = NULL;
-		cmdnames_release(&main_cmds);
+		assumed = xstrdup(main_cmds.names[0]->name);
+
 		fprintf_ln(stderr,
 			   _("WARNING: You called a Git command named '%s', "
 			     "which does not exist."),
@@ -716,7 +715,7 @@ const char *help_unknown_cmd(const char *cmd)
 			strbuf_release(&msg);
 			if (!(starts_with(answer, "y") ||
 			      starts_with(answer, "Y"))) {
-				assumed = NULL;
+				FREE_AND_NULL(assumed);
 				goto out;
 			}
 		} else {
help.h +1 -1
index e716ee27ea1..67207b3073c 100644
@@ -32,7 +32,7 @@ void list_all_other_cmds(struct string_list *list);
 void list_cmds_by_category(struct string_list *list,
 			   const char *category);
 void list_cmds_by_config(struct string_list *list);
-const char *help_unknown_cmd(const char *cmd);
+char *help_unknown_cmd(const char *cmd);
 void load_command_list(const char *prefix,
 		       struct cmdnames *main_cmds,
 		       struct cmdnames *other_cmds);
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#23 lore raw

PATCH 17/26 builtin/help: fix leaks in `check_git_cmd()`

In reply to Patrick Steinhardt

The check_git_cmd() function is declared to return a string constant. And while it sometimes does return a constant, it may also return an allocated string in two cases:

- When handling aliases. This case is already marked with UNLEAK() to work around the leak.

- When handling unknown commands in case "help.autocorrect" is enabled. This one is not marked with UNLEAK().

The function only has a single caller, so let's fix its return type to be non-constant, consistently return an allocated string and free it at its callsite to plug the leak.

---
 builtin/help.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
builtin/help.c +7 -6
index 4a5a0790704..6a72d991a84 100644
@@ -551,12 +551,12 @@ static void show_html_page(const char *page)
 	open_html(page_path.buf);
 }
 
-static const char *check_git_cmd(const char* cmd)
+static char *check_git_cmd(const char *cmd)
 {
 	char *alias;
 
 	if (is_git_command(cmd))
-		return cmd;
+		return xstrdup(cmd);
 
 	alias = alias_lookup(cmd);
 	if (alias) {
@@ -589,14 +589,13 @@ static const char *check_git_cmd(const char* cmd)
 			die(_("bad alias.%s string: %s"), cmd,
 			    split_cmdline_strerror(count));
 		free(argv);
-		UNLEAK(alias);
 		return alias;
 	}
 
 	if (exclude_guides)
 		return help_unknown_cmd(cmd);
 
-	return cmd;
+	return xstrdup(cmd);
 }
 
 static void no_help_format(const char *opt_mode, enum help_format fmt)
@@ -642,6 +641,7 @@ int cmd_help(int argc,
 {
 	int nongit;
 	enum help_format parsed_help_format;
+	char *command = NULL;
 	const char *page;
 
 	argc = parse_options(argc, argv, prefix, builtin_help_options,
@@ -713,9 +713,9 @@ int cmd_help(int argc,
 	if (help_format == HELP_FORMAT_NONE)
 		help_format = parse_help_format(DEFAULT_HELP_FORMAT);
 
-	argv[0] = check_git_cmd(argv[0]);
+	command = check_git_cmd(argv[0]);
 
-	page = cmd_to_page(argv[0]);
+	page = cmd_to_page(command);
 	switch (help_format) {
 	case HELP_FORMAT_NONE:
 	case HELP_FORMAT_MAN:
@@ -729,5 +729,6 @@ int cmd_help(int argc,
 		break;
 	}
 
+	free(command);
 	return 0;
 }
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#24 lore raw

PATCH 18/26 builtin/init-db: fix leaking directory paths

In reply to Patrick Steinhardt

We've got a couple of leaking directory paths in git-init(1), all of which are marked with UNLEAK(). Fixing them is trivial, so let's do that instead so that we can get rid of UNLEAK() entirely.

---
 builtin/init-db.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)
builtin/init-db.c +17 -13
index 7e00d57d654..9e069e27426 100644
@@ -75,10 +75,12 @@ int cmd_init_db(int argc,
 		const char *prefix,
 		struct repository *repo UNUSED)
 {
-	const char *git_dir;
+	char *git_dir;
 	const char *real_git_dir = NULL;
-	const char *work_tree;
+	char *real_git_dir_to_free = NULL;
+	char *work_tree = NULL;
 	const char *template_dir = NULL;
+	char *template_dir_to_free = NULL;
 	unsigned int flags = 0;
 	const char *object_format = NULL;
 	const char *ref_format = NULL;
@@ -106,6 +108,7 @@ int cmd_init_db(int argc,
 			   N_("specify the reference format to use")),
 		OPT_END()
 	};
+	int ret;
 
 	argc = parse_options(argc, argv, prefix, init_db_options, init_db_usage, 0);
 
@@ -113,12 +116,10 @@ int cmd_init_db(int argc,
 		die(_("options '%s' and '%s' cannot be used together"), "--separate-git-dir", "--bare");
 
 	if (real_git_dir && !is_absolute_path(real_git_dir))
-		real_git_dir = real_pathdup(real_git_dir, 1);
+		real_git_dir = real_git_dir_to_free = real_pathdup(real_git_dir, 1);
 
-	if (template_dir && *template_dir && !is_absolute_path(template_dir)) {
-		template_dir = absolute_pathdup(template_dir);
-		UNLEAK(template_dir);
-	}
+	if (template_dir && *template_dir && !is_absolute_path(template_dir))
+		template_dir = template_dir_to_free = absolute_pathdup(template_dir);
 
 	if (argc == 1) {
 		int mkdir_tried = 0;
@@ -192,7 +193,7 @@ int cmd_init_db(int argc,
 	 * Set up the default .git directory contents
 	 */
 	if (!git_dir)
-		git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
+		git_dir = xstrdup(DEFAULT_GIT_DIR_ENVIRONMENT);
 
 	/*
 	 * When --separate-git-dir is used inside a linked worktree, take
@@ -213,6 +214,7 @@ int cmd_init_db(int argc,
 			if (chdir(mainwt.buf) < 0)
 				die_errno(_("cannot chdir to %s"), mainwt.buf);
 			strbuf_release(&mainwt);
+			free(git_dir);
 			git_dir = strbuf_detach(&sb, NULL);
 		}
 		strbuf_release(&sb);
@@ -245,12 +247,14 @@ int cmd_init_db(int argc,
 			set_git_work_tree(work_tree);
 	}
 
-	UNLEAK(real_git_dir);
-	UNLEAK(git_dir);
-	UNLEAK(work_tree);
-
 	flags |= INIT_DB_EXIST_OK;
-	return init_db(git_dir, real_git_dir, template_dir, hash_algo,
+	ret =  init_db(git_dir, real_git_dir, template_dir, hash_algo,
 		       ref_storage_format, initial_branch,
 		       init_shared_repository, flags);
+
+	free(template_dir_to_free);
+	free(real_git_dir_to_free);
+	free(work_tree);
+	free(git_dir);
+	return ret;
 }
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#25 lore raw

Re: [PATCH 18/26] builtin/init-db: fix leaking directory paths

Quoted 70 lines · Patrick Steinhardt

We've got a couple of leaking directory paths in git-init(1), all of which are marked with UNLEAK(). Fixing them is trivial, so let's do that instead so that we can get rid of UNLEAK() entirely.

---
 builtin/init-db.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)
builtin/init-db.c +10 -8
index 7e00d57d654..9e069e27426 100644
@@ -75,10 +75,12 @@ int cmd_init_db(int argc,
 		const char *prefix,
 		struct repository *repo UNUSED)
 {
-	const char *git_dir;
+	char *git_dir;
 	const char *real_git_dir = NULL;
-	const char *work_tree;
+	char *real_git_dir_to_free = NULL;
+	char *work_tree = NULL;
 	const char *template_dir = NULL;
+	char *template_dir_to_free = NULL;
 	unsigned int flags = 0;
 	const char *object_format = NULL;
 	const char *ref_format = NULL;
@@ -106,6 +108,7 @@ int cmd_init_db(int argc,
 			   N_("specify the reference format to use")),
 		OPT_END()
 	};
+	int ret;
 
 	argc = parse_options(argc, argv, prefix, init_db_options, init_db_usage, 0);
 
@@ -113,12 +116,10 @@ int cmd_init_db(int argc,
 		die(_("options '%s' and '%s' cannot be used together"), "--separate-git-dir", "--bare");
 
 	if (real_git_dir && !is_absolute_path(real_git_dir))
-		real_git_dir = real_pathdup(real_git_dir, 1);
+		real_git_dir = real_git_dir_to_free = real_pathdup(real_git_dir, 1);
 
-	if (template_dir && *template_dir && !is_absolute_path(template_dir)) {
-		template_dir = absolute_pathdup(template_dir);
-		UNLEAK(template_dir);
-	}
+	if (template_dir && *template_dir && !is_absolute_path(template_dir))
+		template_dir = template_dir_to_free = absolute_pathdup(template_dir);
 
 	if (argc == 1) {
 		int mkdir_tried = 0;
@@ -192,7 +193,7 @@ int cmd_init_db(int argc,
 	 * Set up the default .git directory contents
 	 */
 	if (!git_dir)
-		git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
+		git_dir = xstrdup(DEFAULT_GIT_DIR_ENVIRONMENT);
 
 	/*
 	 * When --separate-git-dir is used inside a linked worktree, take
@@ -213,6 +214,7 @@ int cmd_init_db(int argc,
 			if (chdir(mainwt.buf) < 0)
 				die_errno(_("cannot chdir to %s"), mainwt.buf);
 			strbuf_release(&mainwt);
+			free(git_dir);
 			git_dir = strbuf_detach(&sb, NULL);
 		}
 		strbuf_release(&sb);

builtin/init-db.c int cmd_init_db(int argc, · line 249

Quoted 5 lines
builtin/init-db.c +0 -2
@@ -245,12 +247,14 @@ int cmd_init_db(int argc,
 			set_git_work_tree(work_tree);
 	}
 
-	UNLEAK(real_git_dir);
-	UNLEAK(git_dir);

We were doing this, out of simplicity, even in cases where it wasn't necessary ...

builtin/init-db.c int cmd_init_db(int argc, · line 250

Quoted 1 line
builtin/init-db.c +0 -1
-	UNLEAK(work_tree);

... and this line is now the free() we are doing below.

OK. Nice clean up.

Quoted 16 lines
builtin/init-db.c +7 -2
-
 	flags |= INIT_DB_EXIST_OK;
-	return init_db(git_dir, real_git_dir, template_dir, hash_algo,
+	ret =  init_db(git_dir, real_git_dir, template_dir, hash_algo,
 		       ref_storage_format, initial_branch,
 		       init_shared_repository, flags);
+
+	free(template_dir_to_free);
+	free(real_git_dir_to_free);
+	free(work_tree);
+	free(git_dir);
+	return ret;
 }
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#26 lore raw

PATCH 19/26 builtin/branch: fix leaking sorting options

In reply to Patrick Steinhardt

The sorting options are leaking, but given that they are marked with UNLEAK() the leak sanitizer doesn't complain.

Fix the leak by creating a common exit path and clearing the vector such that we can get rid of the UNLEAK() annotation entirely.

---
 builtin/branch.c | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)
builtin/branch.c +22 -11
index fd1611ebf55..05ba4cd7a64 100644
@@ -722,6 +722,7 @@ int cmd_branch(int argc,
 	static struct ref_sorting *sorting;
 	struct string_list sorting_options = STRING_LIST_INIT_DUP;
 	struct ref_format format = REF_FORMAT_INIT;
+	int ret;
 
 	struct option options[] = {
 		OPT_GROUP(N_("Generic options")),
@@ -851,15 +852,15 @@ int cmd_branch(int argc,
 	if (list)
 		setup_auto_pager("branch", 1);
 
-	UNLEAK(sorting_options);
-
 	if (delete) {
 		if (!argc)
 			die(_("branch name required"));
-		return delete_branches(argc, argv, delete > 1, filter.kind, quiet);
+		ret = delete_branches(argc, argv, delete > 1, filter.kind, quiet);
+		goto out;
 	} else if (show_current) {
 		print_current_branch_name();
-		return 0;
+		ret = 0;
+		goto out;
 	} else if (list) {
 		/*  git branch --list also shows HEAD when it is detached */
 		if ((filter.kind & FILTER_REFS_BRANCHES) && filter.detached)
@@ -882,12 +883,13 @@ int cmd_branch(int argc,
 		ref_sorting_release(sorting);
 		ref_filter_clear(&filter);
 		ref_format_clear(&format);
-		return 0;
+
+		ret = 0;
+		goto out;
 	} else if (edit_description) {
 		const char *branch_name;
 		struct strbuf branch_ref = STRBUF_INIT;
 		struct strbuf buf = STRBUF_INIT;
-		int ret = 1; /* assume failure */
 
 		if (!argc) {
 			if (filter.detached)
@@ -901,18 +903,22 @@ int cmd_branch(int argc,
 		}
 
 		strbuf_addf(&branch_ref, "refs/heads/%s", branch_name);
-		if (!refs_ref_exists(get_main_ref_store(the_repository), branch_ref.buf))
+		if (!refs_ref_exists(get_main_ref_store(the_repository), branch_ref.buf)) {
 			error((!argc || branch_checked_out(branch_ref.buf))
 			      ? _("no commit on branch '%s' yet")
 			      : _("no branch named '%s'"),
 			      branch_name);
-		else if (!edit_branch_description(branch_name))
+			ret = 1;
+		} else if (!edit_branch_description(branch_name)) {
 			ret = 0; /* happy */
+		} else {
+			ret = 1;
+		}
 
 		strbuf_release(&branch_ref);
 		strbuf_release(&buf);
 
-		return ret;
+		goto out;
 	} else if (copy || rename) {
 		if (!argc)
 			die(_("branch name required"));
@@ -1000,12 +1006,17 @@ int cmd_branch(int argc,
 			create_branches_recursively(the_repository, branch_name,
 						    start_name, NULL, force,
 						    reflog, quiet, track, 0);
-			return 0;
+			ret = 0;
+			goto out;
 		}
 		create_branch(the_repository, branch_name, start_name, force, 0,
 			      reflog, quiet, track, 0);
 	} else
 		usage_with_options(builtin_branch_usage, options);
 
-	return 0;
+	ret = 0;
+
+out:
+	string_list_clear(&sorting_options, 0);
+	return ret;
 }
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#27 lore raw

Re: [PATCH 19/26] builtin/branch: fix leaking sorting options

Quoted 46 lines · Patrick Steinhardt

The sorting options are leaking, but given that they are marked with UNLEAK() the leak sanitizer doesn't complain.

Fix the leak by creating a common exit path and clearing the vector such that we can get rid of the UNLEAK() annotation entirely.

---
 builtin/branch.c | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)
builtin/branch.c +5 -4
index fd1611ebf55..05ba4cd7a64 100644
@@ -722,6 +722,7 @@ int cmd_branch(int argc,
 	static struct ref_sorting *sorting;
 	struct string_list sorting_options = STRING_LIST_INIT_DUP;
 	struct ref_format format = REF_FORMAT_INIT;
+	int ret;
 
 	struct option options[] = {
 		OPT_GROUP(N_("Generic options")),
@@ -851,15 +852,15 @@ int cmd_branch(int argc,
 	if (list)
 		setup_auto_pager("branch", 1);
 
-	UNLEAK(sorting_options);
-
 	if (delete) {
 		if (!argc)
 			die(_("branch name required"));
-		return delete_branches(argc, argv, delete > 1, filter.kind, quiet);
+		ret = delete_branches(argc, argv, delete > 1, filter.kind, quiet);
+		goto out;
 	} else if (show_current) {
 		print_current_branch_name();
-		return 0;
+		ret = 0;
+		goto out;
 	} else if (list) {
 		/*  git branch --list also shows HEAD when it is detached */
 		if ((filter.kind & FILTER_REFS_BRANCHES) && filter.detached)
@@ -882,12 +883,13 @@ int cmd_branch(int argc,
 		ref_sorting_release(sorting);
 		ref_filter_clear(&filter);

builtin/branch.c int cmd_branch(int argc, · line 890

Quoted 10 lines
builtin/branch.c +3 -2
 		ref_format_clear(&format);
-		return 0;
+
+		ret = 0;
+		goto out;
 	} else if (edit_description) {
 		const char *branch_name;
 		struct strbuf branch_ref = STRBUF_INIT;
 		struct strbuf buf = STRBUF_INIT;
-		int ret = 1; /* assume failure */

Now we assume failure ...

Quoted 9 lines
builtin/branch.c +1 -1
 		if (!argc) {
 			if (filter.detached)
@@ -901,18 +903,22 @@ int cmd_branch(int argc,
 		}
 
 		strbuf_addf(&branch_ref, "refs/heads/%s", branch_name);
-		if (!refs_ref_exists(get_main_ref_store(the_repository), branch_ref.buf))
+		if (!refs_ref_exists(get_main_ref_store(the_repository), branch_ref.buf)) {

builtin/branch.c int cmd_branch(int argc, · line 915

Quoted 10 lines
builtin/branch.c +4 -1
 			error((!argc || branch_checked_out(branch_ref.buf))
 			      ? _("no commit on branch '%s' yet")
 			      : _("no branch named '%s'"),
 			      branch_name);
-		else if (!edit_branch_description(branch_name))
+			ret = 1;
+		} else if (!edit_branch_description(branch_name)) {
 			ret = 0; /* happy */
+		} else {
+			ret = 1;

... here. OK.

Quoted 33 lines
builtin/branch.c +9 -3
+		}
 
 		strbuf_release(&branch_ref);
 		strbuf_release(&buf);
 
-		return ret;
+		goto out;
 	} else if (copy || rename) {
 		if (!argc)
 			die(_("branch name required"));
@@ -1000,12 +1006,17 @@ int cmd_branch(int argc,
 			create_branches_recursively(the_repository, branch_name,
 						    start_name, NULL, force,
 						    reflog, quiet, track, 0);
-			return 0;
+			ret = 0;
+			goto out;
 		}
 		create_branch(the_repository, branch_name, start_name, force, 0,
 			      reflog, quiet, track, 0);
 	} else
 		usage_with_options(builtin_branch_usage, options);
 
-	return 0;
+	ret = 0;
+
+out:
+	string_list_clear(&sorting_options, 0);
+	return ret;
 }
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#28 lore raw

PATCH 20/26 t/helper: fix leaking commit graph in "read-graph" subcommand

In reply to Patrick Steinhardt

We're leaking the commit-graph in the "test-helper read-graph" subcommand, but as the leak is annotated with UNLEAK() the leak sanitizer doesn't complain.

Fix the leak by calling free_commit_graph(). Besides getting rid of the UNLEAK() annotation, it also increases code coverage because we properly release resources as Git would do it, as well.

---
 t/helper/test-read-graph.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
t/helper/test-read-graph.c +1 -2
index 9018c9f5412..811dde1cb3c 100644
@@ -97,7 +97,6 @@ int cmd__read_graph(int argc, const char **argv)
 	}
 
 done:
-	UNLEAK(graph);
-
+	free_commit_graph(graph);
 	return ret;
 }
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#29 lore raw

PATCH 21/26 git-compat-util: drop `UNLEAK()` annotation

In reply to Patrick Steinhardt

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 and drop the now-unused UNLEAK() annotation.

---
 builtin/clone.c   |  1 -
 builtin/diff.c    |  1 -
 git-compat-util.h | 20 --------------------
 usage.c           | 15 ---------------
 4 files changed, 37 deletions(-)
builtin/clone.c +0 -1
index 59fcb317a68..e851b1475d7 100644
@@ -1586,7 +1586,6 @@ int cmd_clone(int argc,
 	free(dir);
 	free(path);
 	free(repo_to_free);
-	UNLEAK(repo);
 	junk_mode = JUNK_LEAVE_ALL;
 
 	transport_ls_refs_options_release(&transport_ls_refs_options);
builtin/diff.c +0 -1
index dca52d4221e..2fe92f373e9 100644
@@ -628,6 +628,5 @@ int cmd_diff(int argc,
 	release_revisions(&rev);
 	object_array_clear(&ent);
 	symdiff_release(&sdiff);
-	UNLEAK(blob);
 	return result;
 }
git-compat-util.h +0 -20
index e4a306dd563..a06d4f3809e 100644
@@ -1527,26 +1527,6 @@ int cmd_main(int, const char **);
 int common_exit(const char *file, int line, int code);
 #define exit(code) exit(common_exit(__FILE__, __LINE__, (code)))
 
-/*
- * You can mark a stack variable with UNLEAK(var) to avoid it being
- * reported as a leak by tools like LSAN or valgrind. The argument
- * should generally be the variable itself (not its address and not what
- * it points to). It's safe to use this on pointers which may already
- * have been freed, or on pointers which may still be in use.
- *
- * Use this _only_ for a variable that leaks by going out of scope at
- * program exit (so only from cmd_* functions or their direct helpers).
- * Normal functions, especially those which may be called multiple
- * times, should actually free their memory. This is only meant as
- * an annotation, and does nothing in non-leak-checking builds.
- */
-#ifdef SUPPRESS_ANNOTATED_LEAKS
-void unleak_memory(const void *ptr, size_t len);
-#define UNLEAK(var) unleak_memory(&(var), sizeof(var))
-#else
-#define UNLEAK(var) do {} while (0)
-#endif
-
 #define z_const
 #include <zlib.h>
 
usage.c +0 -15
index 7a2f7805f57..29a9725784a 100644
@@ -350,18 +350,3 @@ void bug_fl(const char *file, int line, const char *fmt, ...)
 	trace2_cmd_error_va(fmt, ap);
 	va_end(ap);
 }
-
-#ifdef SUPPRESS_ANNOTATED_LEAKS
-void unleak_memory(const void *ptr, size_t len)
-{
-	static struct suppressed_leak_root {
-		struct suppressed_leak_root *next;
-		char data[FLEX_ARRAY];
-	} *suppressed_leaks;
-	struct suppressed_leak_root *root;
-
-	FLEX_ALLOC_MEM(root, data, ptr, len);
-	root->next = suppressed_leaks;
-	suppressed_leaks = root;
-}
-#endif
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#30 lore raw

Re: [PATCH 21/26] git-compat-util: drop `UNLEAK()` annotation

Quoted 11 lines · Patrick Steinhardt

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.

Quoted 8 lines

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

OK.

Quoted 1 line

and drop the now-unused UNLEAK() annotation.

Perhaps it would be convenient to do this as a separate commit.

Just for reference we have this annotation since 0e5bba53af (add UNLEAK annotation for reducing leak false positives, 2017-09-08).

Quoted 89 lines
---
 builtin/clone.c   |  1 -
 builtin/diff.c    |  1 -
 git-compat-util.h | 20 --------------------
 usage.c           | 15 ---------------
 4 files changed, 37 deletions(-)
builtin/clone.c +0 -1
index 59fcb317a68..e851b1475d7 100644
@@ -1586,7 +1586,6 @@ int cmd_clone(int argc,
 	free(dir);
 	free(path);
 	free(repo_to_free);
-	UNLEAK(repo);
 	junk_mode = JUNK_LEAVE_ALL;
 
 	transport_ls_refs_options_release(&transport_ls_refs_options);
builtin/diff.c +0 -1
index dca52d4221e..2fe92f373e9 100644
@@ -628,6 +628,5 @@ int cmd_diff(int argc,
 	release_revisions(&rev);
 	object_array_clear(&ent);
 	symdiff_release(&sdiff);
-	UNLEAK(blob);
 	return result;
 }
git-compat-util.h +0 -20
index e4a306dd563..a06d4f3809e 100644
@@ -1527,26 +1527,6 @@ int cmd_main(int, const char **);
 int common_exit(const char *file, int line, int code);
 #define exit(code) exit(common_exit(__FILE__, __LINE__, (code)))
 
-/*
- * You can mark a stack variable with UNLEAK(var) to avoid it being
- * reported as a leak by tools like LSAN or valgrind. The argument
- * should generally be the variable itself (not its address and not what
- * it points to). It's safe to use this on pointers which may already
- * have been freed, or on pointers which may still be in use.
- *
- * Use this _only_ for a variable that leaks by going out of scope at
- * program exit (so only from cmd_* functions or their direct helpers).
- * Normal functions, especially those which may be called multiple
- * times, should actually free their memory. This is only meant as
- * an annotation, and does nothing in non-leak-checking builds.
- */
-#ifdef SUPPRESS_ANNOTATED_LEAKS
-void unleak_memory(const void *ptr, size_t len);
-#define UNLEAK(var) unleak_memory(&(var), sizeof(var))
-#else
-#define UNLEAK(var) do {} while (0)
-#endif
-
 #define z_const
 #include <zlib.h>
 
usage.c +0 -15
index 7a2f7805f57..29a9725784a 100644
@@ -350,18 +350,3 @@ void bug_fl(const char *file, int line, const char *fmt, ...)
 	trace2_cmd_error_va(fmt, ap);
 	va_end(ap);
 }
-
-#ifdef SUPPRESS_ANNOTATED_LEAKS
-void unleak_memory(const void *ptr, size_t len)
-{
-	static struct suppressed_leak_root {
-		struct suppressed_leak_root *next;
-		char data[FLEX_ARRAY];
-	} *suppressed_leaks;
-	struct suppressed_leak_root *root;
-
-	FLEX_ALLOC_MEM(root, data, ptr, len);
-	root->next = suppressed_leaks;
-	suppressed_leaks = root;
-}
-#endif
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#31 lore raw

Re: [PATCH 21/26] git-compat-util: drop `UNLEAK()` annotation

Quoted 21 lines · Rubén Justo
Quoted 11 lines · Patrick Steinhardt

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.

Quoted 8 lines

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

Quoted 8 lines

OK.

Quoted 1 line

and drop the now-unused UNLEAK() annotation.

Perhaps it would be convenient to do this as a separate commit.

Just for reference we have this annotation since 0e5bba53af (add UNLEAK annotation for reducing leak false positives, 2017-09-08).

Makes sense, will do.

Patrick

#32 lore raw

PATCH 22/26 t5601: work around leak sanitizer issue

In reply to Patrick Steinhardt

When running t5601 with the leak checker enabled we can see a hang in our CI systems. This hang seems to be system-specific, as I cannot reproduce it on my own machine.

As it turns out, the issue is in those testcases that exercise cloning of ~repo-style paths. All of the testcases that hang eventually end up interpreting "repo" as the username and will call getpwnam(3p) with that username. That should of course be fine, and getpwnam(3p) should just return an error. But instead, the leak sanitizer seems to be recursing while handling a call to free() in the NSS modules:

    #0  0x00007ffff7fd98d5 in _dl_update_slotinfo (req_modid=1, new_gen=2) at ../elf/dl-tls.c:720
    #1  0x00007ffff7fd9ac4 in update_get_addr (ti=0x7ffff7a91d80, gen=<optimized out>) at ../elf/dl-tls.c:916
    #2  0x00007ffff7fdc85c in __tls_get_addr () at ../sysdeps/x86_64/tls_get_addr.S:55
    #3  0x00007ffff7a27e04 in __lsan::GetAllocatorCache () at ../../../../src/libsanitizer/lsan/lsan_linux.cpp:27
    #4  0x00007ffff7a2b33a in __lsan::Deallocate (p=0x0) at ../../../../src/libsanitizer/lsan/lsan_allocator.cpp:127
    #5  __lsan::lsan_free (p=0x0) at ../../../../src/libsanitizer/lsan/lsan_allocator.cpp:220
    ...
    #261505 0x00007ffff7fd99f2 in free (ptr=<optimized out>) at ../include/rtld-malloc.h:50
    #261506 _dl_update_slotinfo (req_modid=1, new_gen=2) at ../elf/dl-tls.c:822
    #261507 0x00007ffff7fd9ac4 in update_get_addr (ti=0x7ffff7a91d80, gen=<optimized out>) at ../elf/dl-tls.c:916
    #261508 0x00007ffff7fdc85c in __tls_get_addr () at ../sysdeps/x86_64/tls_get_addr.S:55
    #261509 0x00007ffff7a27e04 in __lsan::GetAllocatorCache () at ../../../../src/libsanitizer/lsan/lsan_linux.cpp:27
    #261510 0x00007ffff7a2b33a in __lsan::Deallocate (p=0x5020000001e0) at ../../../../src/libsanitizer/lsan/lsan_allocator.cpp:127
    #261511 __lsan::lsan_free (p=0x5020000001e0) at ../../../../src/libsanitizer/lsan/lsan_allocator.cpp:220
    #261512 0x00007ffff793da25 in module_load (module=0x515000000280) at ./nss/nss_module.c:188
    #261513 0x00007ffff793dee5 in __nss_module_load (module=0x515000000280) at ./nss/nss_module.c:302
    #261514 __nss_module_get_function (module=0x515000000280, name=name@entry=0x7ffff79b9128 "getpwnam_r") at ./nss/nss_module.c:328
    #261515 0x00007ffff793e741 in __GI___nss_lookup_function (fct_name=<optimized out>, ni=<optimized out>) at ./nss/nsswitch.c:137
    #261516 __GI___nss_next2 (ni=ni@entry=0x7fffffffa458, fct_name=fct_name@entry=0x7ffff79b9128 "getpwnam_r", fct2_name=fct2_name@entry=0x0, fctp=fctp@entry=0x7fffffffa460,
        status=status@entry=0, all_values=all_values@entry=0) at ./nss/nsswitch.c:120
    #261517 0x00007ffff794c6a7 in __getpwnam_r (name=name@entry=0x501000000060 "repo", resbuf=resbuf@entry=0x7ffff79fb320 <resbuf>, buffer=<optimized out>,
        buflen=buflen@entry=1024, result=result@entry=0x7fffffffa4b0) at ../nss/getXXbyYY_r.c:343
    #261518 0x00007ffff794c4d8 in getpwnam (name=0x501000000060 "repo") at ../nss/getXXbyYY.c:140
    #261519 0x00005555557e37ff in getpw_str (username=0x5020000001a1 "repo", len=4) at path.c:613
    #261520 0x00005555557e3937 in interpolate_path (path=0x5020000001a0 "~repo", real_home=0) at path.c:654
    #261521 0x00005555557e3aea in enter_repo (path=0x501000000040 "~repo", strict=0) at path.c:718
    #261522 0x000055555568f0ba in cmd_upload_pack (argc=1, argv=0x502000000100, prefix=0x0, repo=0x0) at builtin/upload-pack.c:57
    #261523 0x0000555555575ba8 in run_builtin (p=0x555555a20c98 <commands+3192>, argc=2, argv=0x502000000100, repo=0x555555a53b20 <the_repo>) at git.c:481
    #261524 0x0000555555576067 in handle_builtin (args=0x7fffffffaab0) at git.c:742
    #261525 0x000055555557678d in cmd_main (argc=2, argv=0x7fffffffac58) at git.c:912
    #261526 0x00005555556963cd in main (argc=2, argv=0x7fffffffac58) at common-main.c:64

Note that this stack is more than 260000 function calls deep. Run under the debugger this will eventually segfault, but in our CI systems it seems like this just hangs forever.

I assume that this is a bug either in the leak sanitizer or in glibc, as I cannot reproduce it on my machine. In any case, let's work around the bug for now by marking those tests with the "!SANITIZE_LEAK" prereq.

---
 t/t5601-clone.sh | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)
t/t5601-clone.sh +15 -11
index 9fe665eadfb..d0c18660e33 100755
@@ -544,12 +544,16 @@ do
 		test_clone_url [::1]:$repo ::1 "$repo"
 	'
 done
-#home directory
-test_expect_success "clone host:/~repo" '
+
+# Home directory. All tests that use "~repo" are broken in our CI job when the
+# leak sanitizer is enabled. It seems like either a bug in the sanitizer or in
+# glibc, but when executing getpwnam(3p) with an invalid username we eventually
+# start recursing in a call to free(3p), until bust the stack and segfault.
+test_expect_success !SANITIZE_LEAK "clone host:/~repo" '
 	test_clone_url host:/~repo host "~repo"
 '
 
-test_expect_$expectation_for_ipv6_tests "clone [::1]:/~repo" '
+test_expect_$expectation_for_ipv6_tests !SANITIZE_LEAK "clone [::1]:/~repo" '
 	test_clone_url [::1]:/~repo ::1 "~repo"
 '
 
@@ -569,9 +573,9 @@ do
 		test_clone_url "ssh://host.xz$tcol/home/user/repo" host.xz /home/user/repo
 	'
 	# from home directory
-	test_expect_success "clone ssh://host.xz$tcol/~repo" '
-	test_clone_url "ssh://host.xz$tcol/~repo" host.xz "~repo"
-'
+	test_expect_success !SANITIZE_LEAK "clone ssh://host.xz$tcol/~repo" '
+		test_clone_url "ssh://host.xz$tcol/~repo" host.xz "~repo"
+	'
 done
 
 # with port number
@@ -580,7 +584,7 @@ test_expect_success 'clone ssh://host.xz:22/home/user/repo' '
 '
 
 # from home directory with port number
-test_expect_success 'clone ssh://host.xz:22/~repo' '
+test_expect_success !SANITIZE_LEAK 'clone ssh://host.xz:22/~repo' '
 	test_clone_url "ssh://host.xz:22/~repo" "-p 22 host.xz" "~repo"
 '
 
@@ -597,8 +601,8 @@ done
 for tuah in ::1 [::1] user@::1 user@[::1] [user@::1]
 do
 	euah=$(echo $tuah | tr -d "[]")
-	test_expect_success "clone ssh://$tuah/~repo" "
-	  test_clone_url ssh://$tuah/~repo $euah '~repo'
+	test_expect_success !SANITIZE_LEAK "clone ssh://$tuah/~repo" "
+		test_clone_url ssh://$tuah/~repo $euah '~repo'
 	"
 done
 
@@ -615,8 +619,8 @@ done
 for tuah in [::1] user@[::1] [user@::1]
 do
 	euah=$(echo $tuah | tr -d "[]")
-	test_expect_success "clone ssh://$tuah:22/~repo" "
-	  test_clone_url ssh://$tuah:22/~repo '-p 22' $euah '~repo'
+	test_expect_success !SANITIZE_LEAK "clone ssh://$tuah:22/~repo" "
+		  test_clone_url ssh://$tuah:22/~repo '-p 22' $euah '~repo'
 	"
 done
 
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#33 lore raw

PATCH 23/26 t: mark some tests as leak free

In reply to Patrick Steinhardt

Both t5558 and t5601 are leak-free starting with 6dab49b9fb (bundle-uri:
plug leak in unbundle_from_file(), 2024-10-10). Mark them accordingly.

---
 t/t5558-clone-bundle-uri.sh | 1 +
 t/t5601-clone.sh            | 1 +
 2 files changed, 2 insertions(+)
t/t5558-clone-bundle-uri.sh +1 -0
index 3816ed5058d..b488b505b92 100755
@@ -2,6 +2,7 @@
 
 test_description='test fetching bundles with --bundle-uri'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-bundle.sh
 
t/t5601-clone.sh +1 -0
index d0c18660e33..3b5285cfcf3 100755
@@ -5,6 +5,7 @@ test_description=clone
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 X=
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#34 lore raw

PATCH 24/26 t: remove unneeded !SANITIZE_LEAK prerequisites

In reply to Patrick Steinhardt

We have a couple of !SANITIZE_LEAK prerequisites for tests that used to fail due to memory leaks. These have all been fixed by now, so let's drop the prerequisite.

---
 t/t0095-bloom.sh          |  2 +-
 t/t2407-worktree-heads.sh | 16 ++++++++--------
 t/t4020-diff-external.sh  |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)
t/t0095-bloom.sh +1 -1
index c8d84ab6061..08df74cacfc 100755
@@ -77,7 +77,7 @@ test_expect_success 'compute bloom key for test string 2' '
 	test_cmp expect actual
 '
 
-test_expect_success !SANITIZE_LEAK 'get bloom filters for commit with no changes' '
+test_expect_success 'get bloom filters for commit with no changes' '
 	git init &&
 	git commit --allow-empty -m "c0" &&
 	cat >expect <<-\EOF &&
t/t2407-worktree-heads.sh +8 -8
index f6835c91dcc..7750dc9265a 100755
@@ -49,7 +49,7 @@ test_expect_success 'refuse to overwrite: checked out in worktree' '
 	done
 '
 
-test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in bisect' '
+test_expect_success 'refuse to overwrite: worktree in bisect' '
 	test_when_finished git -C wt-4 bisect reset &&
 
 	# Set up a bisect so HEAD no longer points to wt-4.
@@ -61,7 +61,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in bisect' '
 	grep "cannot force update the branch '\''wt-4'\'' used by worktree at.*wt-4" err
 '
 
-test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase (apply)' '
+test_expect_success 'refuse to overwrite: worktree in rebase (apply)' '
 	test_when_finished git -C wt-2 rebase --abort &&
 
 	# This will fail part-way through due to a conflict.
@@ -71,7 +71,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase (app
 	grep "cannot force update the branch '\''wt-2'\'' used by worktree at.*wt-2" err
 '
 
-test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase (merge)' '
+test_expect_success 'refuse to overwrite: worktree in rebase (merge)' '
 	test_when_finished git -C wt-2 rebase --abort &&
 
 	# This will fail part-way through due to a conflict.
@@ -81,7 +81,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase (mer
 	grep "cannot force update the branch '\''wt-2'\'' used by worktree at.*wt-2" err
 '
 
-test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase with --update-refs' '
+test_expect_success 'refuse to overwrite: worktree in rebase with --update-refs' '
 	test_when_finished git -C wt-3 rebase --abort &&
 
 	git branch -f can-be-updated wt-3 &&
@@ -95,7 +95,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to overwrite: worktree in rebase with
 	done
 '
 
-test_expect_success !SANITIZE_LEAK 'refuse to fetch over ref: checked out' '
+test_expect_success 'refuse to fetch over ref: checked out' '
 	test_must_fail git fetch server +refs/heads/wt-3:refs/heads/wt-3 2>err &&
 	grep "refusing to fetch into branch '\''refs/heads/wt-3'\''" err &&
 
@@ -105,7 +105,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to fetch over ref: checked out' '
 	grep "refusing to fetch into branch" err
 '
 
-test_expect_success !SANITIZE_LEAK 'refuse to fetch over ref: worktree in bisect' '
+test_expect_success 'refuse to fetch over ref: worktree in bisect' '
 	test_when_finished git -C wt-4 bisect reset &&
 
 	# Set up a bisect so HEAD no longer points to wt-4.
@@ -117,7 +117,7 @@ test_expect_success !SANITIZE_LEAK 'refuse to fetch over ref: worktree in bisect
 	grep "refusing to fetch into branch" err
 '
 
-test_expect_success !SANITIZE_LEAK 'refuse to fetch over ref: worktree in rebase' '
+test_expect_success 'refuse to fetch over ref: worktree in rebase' '
 	test_when_finished git -C wt-3 rebase --abort &&
 
 	# This will fail part-way through due to a conflict.
@@ -157,7 +157,7 @@ test_expect_success 'refuse to overwrite when in error states' '
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
-test_expect_success !SANITIZE_LEAK 'refuse to overwrite during rebase with --update-refs' '
+test_expect_success 'refuse to overwrite during rebase with --update-refs' '
 	git commit --fixup HEAD~2 --allow-empty &&
 	(
 		set_cat_todo_editor &&
t/t4020-diff-external.sh +2 -2
index 3baa52a9bf6..0e5a05894fd 100755
@@ -102,7 +102,7 @@ test_expect_success 'diff attribute' '
 	test_cmp expect actual
 '
 
-test_expect_success !SANITIZE_LEAK 'diff attribute should apply only to diff' '
+test_expect_success 'diff attribute should apply only to diff' '
 	git log -p -1 HEAD >out &&
 	grep "^diff --git a/file b/file" out
 
@@ -129,7 +129,7 @@ test_expect_success 'diff attribute' '
 	test_cmp expect actual
 '
 
-test_expect_success !SANITIZE_LEAK 'diff attribute should apply only to diff' '
+test_expect_success 'diff attribute should apply only to diff' '
 	git log -p -1 HEAD >out &&
 	grep "^diff --git a/file b/file" out
 
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#35 lore raw

PATCH 25/26 test-lib: unconditionally enable leak checking

In reply to Patrick Steinhardt

Over the last two releases we have plugged a couple hundred of memory leaks exposed by the Git test suite. With the preceding commits we have finally fixed the last leak exposed by our test suite, which means that we are now basically leak free wherever we have branch coverage.

From hereon, the Git test suite should ideally stay free of memory leaks. Most importantly, any test suite that is being added should automatically be subject to the leak checker, and if that test does not pass it is a strong signal that the added code introduced new memory leaks and should not be accepted without further changes.

Drop the infrastructure around TEST_PASSES_SANITIZE_LEAK to reflect this new requirement. Like this, all test suites will be subject to the leak checker by default.

This is being intentionally strict, but we still have an escape hatch:
the SANITIZE_LEAK prerequisite. There is one known case in t5601 where the leak sanitizer itself is buggy, so adding this prereq in such cases is acceptable. Another acceptable situation is when a newly added test uncovers preexisting memory leaks: when fixing that memory leak would be sufficiently complicated it is fine to annotate and document the leak accordingly. But in any case, the burden is now on the patch author to explain why exactly they have to add the SANITIZE_LEAK prerequisite.

The TEST_PASSES_SANITIZE_LEAK annotations will be dropped in the next patch.

---
 ci/lib.sh        |  1 -
 t/README         | 21 --------------
 t/lib-git-svn.sh |  4 ---
 t/test-lib.sh    | 72 +-----------------------------------------------
 4 files changed, 1 insertion(+), 97 deletions(-)
ci/lib.sh +0 -1
index 246072a0932..930f98d7228 100755
@@ -384,7 +384,6 @@ linux-musl)
 	;;
 linux-leaks|linux-reftable-leaks)
 	export SANITIZE=leak
-	export GIT_TEST_PASSING_SANITIZE_LEAK=true
 	;;
 linux-asan-ubsan)
 	export SANITIZE=address,undefined
t/README +0 -21
index 8c0319b58e5..e84824dc002 100644
@@ -368,27 +368,6 @@ excluded as so much relies on it, but this might change in the future.
 GIT_TEST_SPLIT_INDEX=<boolean> forces split-index mode on the whole
 test suite. Accept any boolean values that are accepted by git-config.
 
-GIT_TEST_PASSING_SANITIZE_LEAK=true skips those tests that haven't
-declared themselves as leak-free by setting
-"TEST_PASSES_SANITIZE_LEAK=true" before sourcing "test-lib.sh". This
-test mode is used by the "linux-leaks" CI target.
-
-GIT_TEST_PASSING_SANITIZE_LEAK=check checks that our
-"TEST_PASSES_SANITIZE_LEAK=true" markings are current. Rather than
-skipping those tests that haven't set "TEST_PASSES_SANITIZE_LEAK=true"
-before sourcing "test-lib.sh" this mode runs them with
-"--invert-exit-code". This is used to check that there's a one-to-one
-mapping between "TEST_PASSES_SANITIZE_LEAK=true" and those tests that
-pass under "SANITIZE=leak". This is especially useful when testing a
-series that fixes various memory leaks with "git rebase -x".
-
-GIT_TEST_PASSING_SANITIZE_LEAK=check when combined with "--immediate"
-will run to completion faster, and result in the same failing
-tests.
-
-GIT_TEST_PASSING_SANITIZE_LEAK=check-failing behaves the same as "check",
-but skips all tests which are already marked as leak-free.
-
 GIT_TEST_PROTOCOL_VERSION=<n>, when set, makes 'protocol.version'
 default to n.
 
t/lib-git-svn.sh +0 -4
index ea28971e8ee..2fde2353fd3 100644
@@ -1,7 +1,3 @@
-if test -z "$TEST_FAILS_SANITIZE_LEAK"
-then
-	TEST_PASSES_SANITIZE_LEAK=true
-fi
 . ./test-lib.sh
 
 if test -n "$NO_SVN_TESTS"
t/test-lib.sh +1 -71

98 lines not on this page · raw message

Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#36 lore raw

PATCH 26/26 t: remove TEST_PASSES_SANITIZE_LEAK annotations

In reply to Patrick Steinhardt

Now that the default value for TEST_PASSES_SANITIZE_LEAK is true there is no longer a need to have that variable declared in all of our tests. Drop it.

---
 t/t0001-init.sh                                    | 1 -
 t/t0002-gitfile.sh                                 | 1 -
 t/t0003-attributes.sh                              | 1 -
 t/t0004-unwritable.sh                              | 1 -
 t/t0005-signals.sh                                 | 1 -
 t/t0006-date.sh                                    | 1 -
 t/t0007-git-var.sh                                 | 1 -
 t/t0008-ignores.sh                                 | 1 -
 t/t0010-racy-git.sh                                | 1 -
 t/t0012-help.sh                                    | 1 -
 t/t0013-sha1dc.sh                                  | 1 -
 t/t0014-alias.sh                                   | 1 -
 t/t0017-env-helper.sh                              | 1 -
 t/t0018-advice.sh                                  | 1 -
 t/t0019-json-writer.sh                             | 1 -
 t/t0020-crlf.sh                                    | 1 -
 t/t0021-conversion.sh                              | 1 -
 t/t0022-crlf-rename.sh                             | 1 -
 t/t0023-crlf-am.sh                                 | 1 -
 t/t0024-crlf-archive.sh                            | 1 -
 t/t0025-crlf-renormalize.sh                        | 1 -
 t/t0026-eol-config.sh                              | 1 -
 t/t0027-auto-crlf.sh                               | 1 -
 t/t0028-working-tree-encoding.sh                   | 1 -
 t/t0029-core-unsetenvvars.sh                       | 1 -
 t/t0030-stripspace.sh                              | 1 -
 t/t0033-safe-directory.sh                          | 1 -
 t/t0035-safe-bare-repository.sh                    | 1 -
 t/t0040-parse-options.sh                           | 1 -
 t/t0041-usage.sh                                   | 1 -
 t/t0050-filesystem.sh                              | 1 -
 t/t0052-simple-ipc.sh                              | 1 -
 t/t0055-beyond-symlinks.sh                         | 1 -
 t/t0056-git-C.sh                                   | 1 -
 t/t0060-path-utils.sh                              | 1 -
 t/t0061-run-command.sh                             | 1 -
 t/t0062-revision-walking.sh                        | 1 -
 t/t0063-string-list.sh                             | 1 -
 t/t0066-dir-iterator.sh                            | 1 -
 t/t0067-parse_pathspec_file.sh                     | 1 -
 t/t0068-for-each-repo.sh                           | 1 -
 t/t0070-fundamental.sh                             | 1 -
 t/t0071-sort.sh                                    | 1 -
 t/t0080-unit-test-output.sh                        | 1 -
 t/t0081-find-pack.sh                               | 1 -
 t/t0090-cache-tree.sh                              | 1 -
 t/t0091-bugreport.sh                               | 1 -
 t/t0092-diagnose.sh                                | 1 -
 t/t0095-bloom.sh                                   | 1 -
 t/t0100-previous.sh                                | 1 -
 t/t0101-at-syntax.sh                               | 1 -
 t/t0200-gettext-basic.sh                           | 1 -
 t/t0201-gettext-fallbacks.sh                       | 1 -
 t/t0202-gettext-perl.sh                            | 1 -
 t/t0203-gettext-setlocale-sanity.sh                | 1 -
 t/t0204-gettext-reencode-sanity.sh                 | 1 -
 t/t0210-trace2-normal.sh                           | 1 -
 t/t0211-trace2-perf.sh                             | 1 -
 t/t0212-trace2-event.sh                            | 1 -
 t/t0300-credentials.sh                             | 1 -
 t/t0301-credential-cache.sh                        | 1 -
 t/t0302-credential-store.sh                        | 1 -
 t/t0303-credential-external.sh                     | 1 -
 t/t0410-partial-clone.sh                           | 1 -
 t/t0411-clone-from-partial.sh                      | 1 -
 t/t0450-txt-doc-vs-help.sh                         | 1 -
 t/t0500-progress-display.sh                        | 1 -
 t/t0600-reffiles-backend.sh                        | 1 -
 t/t0601-reffiles-pack-refs.sh                      | 1 -
 t/t0602-reffiles-fsck.sh                           | 1 -
 t/t0610-reftable-basics.sh                         | 1 -
 t/t0611-reftable-httpd.sh                          | 1 -
 t/t0612-reftable-jgit-compatibility.sh             | 1 -
 t/t0613-reftable-write-options.sh                  | 1 -
 t/t1000-read-tree-m-3way.sh                        | 1 -
 t/t1001-read-tree-m-2way.sh                        | 1 -
 t/t1002-read-tree-m-u-2way.sh                      | 1 -
 t/t1003-read-tree-prefix.sh                        | 1 -
 t/t1004-read-tree-m-u-wf.sh                        | 1 -
 t/t1005-read-tree-reset.sh                         | 1 -
 t/t1006-cat-file.sh                                | 1 -
 t/t1007-hash-object.sh                             | 1 -
 t/t1008-read-tree-overlay.sh                       | 1 -
 t/t1009-read-tree-new-index.sh                     | 1 -
 t/t1010-mktree.sh                                  | 1 -
 t/t1011-read-tree-sparse-checkout.sh               | 1 -
 t/t1012-read-tree-df.sh                            | 1 -
 t/t1013-read-tree-submodule.sh                     | 1 -
 t/t1014-read-tree-confusing.sh                     | 1 -
 t/t1015-read-index-unmerged.sh                     | 1 -
 t/t1016-compatObjectFormat.sh                      | 1 -
 t/t1020-subdirectory.sh                            | 1 -
 t/t1021-rerere-in-workdir.sh                       | 1 -
 t/t1022-read-tree-partial-clone.sh                 | 1 -
 t/t1050-large.sh                                   | 1 -
 t/t1051-large-conversion.sh                        | 1 -
 t/t1060-object-corruption.sh                       | 1 -
 t/t1090-sparse-checkout-scope.sh                   | 1 -
 t/t1091-sparse-checkout-builtin.sh                 | 1 -
 t/t1092-sparse-checkout-compatibility.sh           | 1 -
 t/t1100-commit-tree-options.sh                     | 1 -
 t/t1300-config.sh                                  | 1 -
 t/t1301-shared-repo.sh                             | 1 -
 t/t1302-repo-version.sh                            | 1 -
 t/t1303-wacky-config.sh                            | 1 -
 t/t1304-default-acl.sh                             | 1 -
 t/t1305-config-include.sh                          | 1 -
 t/t1306-xdg-files.sh                               | 1 -
 t/t1307-config-blob.sh                             | 1 -
 t/t1308-config-set.sh                              | 1 -
 t/t1309-early-config.sh                            | 1 -
 t/t1310-config-default.sh                          | 1 -
 t/t1350-config-hooks-path.sh                       | 1 -
 t/t1400-update-ref.sh                              | 1 -
 t/t1401-symbolic-ref.sh                            | 1 -
 t/t1402-check-ref-format.sh                        | 1 -
 t/t1403-show-ref.sh                                | 1 -
 t/t1404-update-ref-errors.sh                       | 1 -
 t/t1405-main-ref-store.sh                          | 1 -
 t/t1406-submodule-ref-store.sh                     | 1 -
 t/t1407-worktree-ref-store.sh                      | 1 -
 t/t1408-packed-refs.sh                             | 1 -
 t/t1409-avoid-packing-refs.sh                      | 1 -
 t/t1410-reflog.sh                                  | 1 -
 t/t1411-reflog-show.sh                             | 1 -
 t/t1412-reflog-loop.sh                             | 1 -
 t/t1413-reflog-detach.sh                           | 1 -
 t/t1414-reflog-walk.sh                             | 1 -
 t/t1415-worktree-refs.sh                           | 1 -
 t/t1416-ref-transaction-hooks.sh                   | 1 -
 t/t1417-reflog-updateref.sh                        | 1 -
 t/t1418-reflog-exists.sh                           | 1 -
 t/t1419-exclude-refs.sh                            | 1 -
 t/t1420-lost-found.sh                              | 1 -
 t/t1430-bad-ref-name.sh                            | 1 -
 t/t1450-fsck.sh                                    | 1 -
 t/t1451-fsck-buffer.sh                             | 1 -
 t/t1460-refs-migrate.sh                            | 1 -
 t/t1500-rev-parse.sh                               | 1 -
 t/t1501-work-tree.sh                               | 1 -
 t/t1502-rev-parse-parseopt.sh                      | 1 -
 t/t1503-rev-parse-verify.sh                        | 1 -
 t/t1504-ceiling-dirs.sh                            | 1 -
 t/t1505-rev-parse-last.sh                          | 1 -
 t/t1506-rev-parse-diagnosis.sh                     | 1 -
 t/t1507-rev-parse-upstream.sh                      | 1 -
 t/t1508-at-combinations.sh                         | 1 -
 t/t1510-repo-setup.sh                              | 1 -
 t/t1511-rev-parse-caret.sh                         | 1 -
 t/t1512-rev-parse-disambiguation.sh                | 1 -
 t/t1513-rev-parse-prefix.sh                        | 1 -
 t/t1514-rev-parse-push.sh                          | 1 -
 t/t1515-rev-parse-outside-repo.sh                  | 1 -
 t/t1517-outside-repo.sh                            | 1 -
 t/t1600-index.sh                                   | 1 -
 t/t1601-index-bogus.sh                             | 1 -
 t/t1700-split-index.sh                             | 1 -
 t/t1701-racy-split-index.sh                        | 1 -
 t/t1800-hook.sh                                    | 1 -
 t/t2000-conflict-when-checking-files-out.sh        | 1 -
 t/t2002-checkout-cache-u.sh                        | 1 -
 t/t2003-checkout-cache-mkdir.sh                    | 1 -
 t/t2004-checkout-cache-temp.sh                     | 1 -
 t/t2005-checkout-index-symlinks.sh                 | 1 -
 t/t2006-checkout-index-basic.sh                    | 1 -
 t/t2007-checkout-symlink.sh                        | 1 -
 t/t2008-checkout-subdir.sh                         | 1 -
 t/t2009-checkout-statinfo.sh                       | 1 -
 t/t2010-checkout-ambiguous.sh                      | 1 -
 t/t2011-checkout-invalid-head.sh                   | 1 -
 t/t2012-checkout-last.sh                           | 1 -
 t/t2013-checkout-submodule.sh                      | 1 -
 t/t2014-checkout-switch.sh                         | 1 -
 t/t2015-checkout-unborn.sh                         | 1 -
 t/t2016-checkout-patch.sh                          | 1 -
 t/t2017-checkout-orphan.sh                         | 1 -
 t/t2018-checkout-branch.sh                         | 1 -
 t/t2019-checkout-ambiguous-ref.sh                  | 1 -
 t/t2020-checkout-detach.sh                         | 1 -
 t/t2021-checkout-overwrite.sh                      | 1 -
 t/t2022-checkout-paths.sh                          | 1 -
 t/t2023-checkout-m.sh                              | 1 -
 t/t2024-checkout-dwim.sh                           | 1 -
 t/t2025-checkout-no-overlay.sh                     | 1 -
 t/t2026-checkout-pathspec-file.sh                  | 1 -
 t/t2027-checkout-track.sh                          | 1 -
 t/t2030-unresolve-info.sh                          | 1 -
 t/t2050-git-dir-relative.sh                        | 1 -
 t/t2060-switch.sh                                  | 1 -
 t/t2070-restore.sh                                 | 1 -
 t/t2071-restore-patch.sh                           | 1 -
 t/t2072-restore-pathspec-file.sh                   | 1 -
 t/t2080-parallel-checkout-basics.sh                | 1 -
 t/t2081-parallel-checkout-collisions.sh            | 1 -
 t/t2082-parallel-checkout-attributes.sh            | 1 -
 t/t2100-update-cache-badpath.sh                    | 1 -
 t/t2101-update-index-reupdate.sh                   | 1 -
 t/t2102-update-index-symlinks.sh                   | 1 -
 t/t2103-update-index-ignore-missing.sh             | 1 -
 t/t2104-update-index-skip-worktree.sh              | 1 -
 t/t2105-update-index-gitfile.sh                    | 1 -
 t/t2106-update-index-assume-unchanged.sh           | 1 -
 t/t2107-update-index-basic.sh                      | 1 -
 t/t2108-update-index-refresh-racy.sh               | 1 -
 t/t2200-add-update.sh                              | 1 -
 t/t2201-add-update-typechange.sh                   | 1 -
 t/t2202-add-addremove.sh                           | 1 -
 t/t2203-add-intent.sh                              | 1 -
 t/t2204-add-ignored.sh                             | 1 -
 t/t2205-add-worktree-config.sh                     | 1 -
 t/t2300-cd-to-toplevel.sh                          | 1 -
 t/t2400-worktree-add.sh                            | 1 -
 t/t2401-worktree-prune.sh                          | 1 -
 t/t2402-worktree-list.sh                           | 1 -
 t/t2403-worktree-move.sh                           | 1 -
 t/t2404-worktree-config.sh                         | 1 -
 t/t2405-worktree-submodule.sh                      | 1 -
 t/t2406-worktree-repair.sh                         | 1 -
 t/t2407-worktree-heads.sh                          | 1 -
 t/t2408-worktree-relative.sh                       | 1 -
 t/t2500-untracked-overwriting.sh                   | 1 -
 t/t2501-cwd-empty.sh                               | 1 -
 t/t3000-ls-files-others.sh                         | 1 -
 t/t3001-ls-files-others-exclude.sh                 | 1 -
 t/t3002-ls-files-dashpath.sh                       | 1 -
 t/t3003-ls-files-exclude.sh                        | 1 -
 t/t3004-ls-files-basic.sh                          | 1 -
 t/t3005-ls-files-relative.sh                       | 1 -
 t/t3006-ls-files-long.sh                           | 1 -
 t/t3007-ls-files-recurse-submodules.sh             | 1 -
 t/t3008-ls-files-lazy-init-name-hash.sh            | 1 -
 t/t3009-ls-files-others-nonsubmodule.sh            | 1 -
 t/t3010-ls-files-killed-modified.sh                | 1 -
 t/t3011-common-prefixes-and-directory-traversal.sh | 1 -
 t/t3012-ls-files-dedup.sh                          | 1 -
 t/t3013-ls-files-format.sh                         | 1 -
 t/t3020-ls-files-error-unmatch.sh                  | 1 -
 t/t3040-subprojects-basic.sh                       | 1 -
 t/t3050-subprojects-fetch.sh                       | 1 -
 t/t3060-ls-files-with-tree.sh                      | 1 -
 t/t3070-wildmatch.sh                               | 1 -
 t/t3100-ls-tree-restrict.sh                        | 1 -
 t/t3101-ls-tree-dirname.sh                         | 1 -
 t/t3102-ls-tree-wildcards.sh                       | 1 -
 t/t3103-ls-tree-misc.sh                            | 1 -
 t/t3104-ls-tree-format.sh                          | 1 -
 t/t3105-ls-tree-output.sh                          | 1 -
 t/t3200-branch.sh                                  | 1 -
 t/t3201-branch-contains.sh                         | 1 -
 t/t3202-show-branch.sh                             | 1 -
 t/t3203-branch-output.sh                           | 1 -
 t/t3204-branch-name-interpretation.sh              | 1 -
 t/t3205-branch-color.sh                            | 1 -
 t/t3206-range-diff.sh                              | 1 -
 t/t3207-branch-submodule.sh                        | 1 -
 t/t3211-peel-ref.sh                                | 1 -
 t/t3300-funny-names.sh                             | 1 -
 t/t3301-notes.sh                                   | 1 -
 t/t3302-notes-index-expensive.sh                   | 1 -
 t/t3303-notes-subtrees.sh                          | 1 -
 t/t3304-notes-mixed.sh                             | 1 -
 t/t3305-notes-fanout.sh                            | 1 -
 t/t3306-notes-prune.sh                             | 1 -
 t/t3307-notes-man.sh                               | 1 -
 t/t3308-notes-merge.sh                             | 1 -
 t/t3309-notes-merge-auto-resolve.sh                | 1 -
 t/t3310-notes-merge-manual-resolve.sh              | 1 -
 t/t3311-notes-merge-fanout.sh                      | 1 -
 t/t3320-notes-merge-worktrees.sh                   | 1 -
 t/t3321-notes-stripspace.sh                        | 1 -
 t/t3400-rebase.sh                                  | 1 -
 t/t3401-rebase-and-am-rename.sh                    | 1 -
 t/t3402-rebase-merge.sh                            | 1 -
 t/t3403-rebase-skip.sh                             | 1 -
 t/t3404-rebase-interactive.sh                      | 1 -
 t/t3405-rebase-malformed.sh                        | 1 -
 t/t3406-rebase-message.sh                          | 1 -
 t/t3407-rebase-abort.sh                            | 1 -
 t/t3408-rebase-multi-line.sh                       | 1 -
 t/t3409-rebase-environ.sh                          | 1 -
 t/t3412-rebase-root.sh                             | 1 -
 t/t3413-rebase-hook.sh                             | 1 -
 t/t3415-rebase-autosquash.sh                       | 1 -
 t/t3416-rebase-onto-threedots.sh                   | 1 -
 t/t3417-rebase-whitespace-fix.sh                   | 1 -
 t/t3418-rebase-continue.sh                         | 1 -
 t/t3419-rebase-patch-id.sh                         | 1 -
 t/t3420-rebase-autostash.sh                        | 1 -
 t/t3421-rebase-topology-linear.sh                  | 1 -
 t/t3422-rebase-incompatible-options.sh             | 1 -
 t/t3423-rebase-reword.sh                           | 1 -
 t/t3424-rebase-empty.sh                            | 1 -
 t/t3425-rebase-topology-merges.sh                  | 1 -
 t/t3426-rebase-submodule.sh                        | 1 -
 t/t3427-rebase-subtree.sh                          | 1 -
 t/t3428-rebase-signoff.sh                          | 1 -
 t/t3429-rebase-edit-todo.sh                        | 1 -
 t/t3430-rebase-merges.sh                           | 1 -
 t/t3431-rebase-fork-point.sh                       | 1 -
 t/t3432-rebase-fast-forward.sh                     | 1 -
 t/t3433-rebase-across-mode-change.sh               | 1 -
 t/t3434-rebase-i18n.sh                             | 1 -
 t/t3435-rebase-gpg-sign.sh                         | 1 -
 t/t3436-rebase-more-options.sh                     | 1 -
 t/t3437-rebase-fixup-options.sh                    | 1 -
 t/t3438-rebase-broken-files.sh                     | 1 -
 t/t3500-cherry.sh                                  | 1 -
 t/t3501-revert-cherry-pick.sh                      | 1 -
 t/t3502-cherry-pick-merge.sh                       | 1 -
 t/t3503-cherry-pick-root.sh                        | 1 -
 t/t3504-cherry-pick-rerere.sh                      | 1 -
 t/t3505-cherry-pick-empty.sh                       | 1 -
 t/t3506-cherry-pick-ff.sh                          | 1 -
 t/t3507-cherry-pick-conflict.sh                    | 1 -
 t/t3508-cherry-pick-many-commits.sh                | 1 -
 t/t3509-cherry-pick-merge-df.sh                    | 1 -
 t/t3510-cherry-pick-sequence.sh                    | 1 -
 t/t3511-cherry-pick-x.sh                           | 1 -
 t/t3512-cherry-pick-submodule.sh                   | 1 -
 t/t3513-revert-submodule.sh                        | 1 -
 t/t3514-cherry-pick-revert-gpg.sh                  | 1 -
 t/t3600-rm.sh                                      | 1 -
 t/t3601-rm-pathspec-file.sh                        | 1 -
 t/t3602-rm-sparse-checkout.sh                      | 1 -
 t/t3650-replay-basics.sh                           | 1 -
 t/t3700-add.sh                                     | 1 -
 t/t3701-add-interactive.sh                         | 1 -
 t/t3702-add-edit.sh                                | 1 -
 t/t3703-add-magic-pathspec.sh                      | 1 -
 t/t3704-add-pathspec-file.sh                       | 1 -
 t/t3705-add-sparse-checkout.sh                     | 1 -
 t/t3800-mktag.sh                                   | 1 -
 t/t3900-i18n-commit.sh                             | 1 -
 t/t3901-i18n-patch.sh                              | 1 -
 t/t3902-quoted.sh                                  | 1 -
 t/t3903-stash.sh                                   | 1 -
 t/t3904-stash-patch.sh                             | 1 -
 t/t3905-stash-include-untracked.sh                 | 1 -
 t/t3906-stash-submodule.sh                         | 1 -
 t/t3907-stash-show-config.sh                       | 1 -
 t/t3908-stash-in-worktree.sh                       | 1 -
 t/t3909-stash-pathspec-file.sh                     | 1 -
 t/t3920-crlf-messages.sh                           | 1 -
 t/t4000-diff-format.sh                             | 1 -
 t/t4001-diff-rename.sh                             | 1 -
 t/t4002-diff-basic.sh                              | 1 -
 t/t4003-diff-rename-1.sh                           | 1 -
 t/t4004-diff-rename-symlink.sh                     | 1 -
 t/t4005-diff-rename-2.sh                           | 1 -
 t/t4006-diff-mode.sh                               | 1 -
 t/t4007-rename-3.sh                                | 1 -
 t/t4008-diff-break-rewrite.sh                      | 1 -
 t/t4009-diff-rename-4.sh                           | 1 -
 t/t4010-diff-pathspec.sh                           | 1 -
 t/t4011-diff-symlink.sh                            | 1 -
 t/t4012-diff-binary.sh                             | 1 -
 t/t4013-diff-various.sh                            | 1 -
 t/t4014-format-patch.sh                            | 1 -
 t/t4015-diff-whitespace.sh                         | 1 -
 t/t4016-diff-quote.sh                              | 1 -
 t/t4017-diff-retval.sh                             | 1 -
 t/t4018-diff-funcname.sh                           | 1 -
 t/t4019-diff-wserror.sh                            | 1 -
 t/t4020-diff-external.sh                           | 1 -
 t/t4021-format-patch-numbered.sh                   | 1 -
 t/t4022-diff-rewrite.sh                            | 1 -
 t/t4023-diff-rename-typechange.sh                  | 1 -
 t/t4024-diff-optimize-common.sh                    | 1 -
 t/t4025-hunk-header.sh                             | 1 -
 t/t4026-color.sh                                   | 1 -
 t/t4027-diff-submodule.sh                          | 1 -
 t/t4028-format-patch-mime-headers.sh               | 1 -
 t/t4029-diff-trailing-space.sh                     | 1 -
 t/t4030-diff-textconv.sh                           | 1 -
 t/t4031-diff-rewrite-binary.sh                     | 1 -
 t/t4032-diff-inter-hunk-context.sh                 | 1 -
 t/t4033-diff-patience.sh                           | 1 -
 t/t4034-diff-words.sh                              | 1 -
 t/t4035-diff-quiet.sh                              | 1 -
 t/t4036-format-patch-signer-mime.sh                | 1 -
 t/t4037-diff-r-t-dirs.sh                           | 1 -
 t/t4038-diff-combined.sh                           | 1 -
 t/t4039-diff-assume-unchanged.sh                   | 1 -
 t/t4040-whitespace-status.sh                       | 1 -
 t/t4041-diff-submodule-option.sh                   | 1 -
 t/t4042-diff-textconv-caching.sh                   | 1 -
 t/t4043-diff-rename-binary.sh                      | 1 -
 t/t4044-diff-index-unique-abbrev.sh                | 1 -
 t/t4045-diff-relative.sh                           | 1 -
 t/t4046-diff-unmerged.sh                           | 1 -
 t/t4047-diff-dirstat.sh                            | 1 -
 t/t4048-diff-combined-binary.sh                    | 1 -
 t/t4049-diff-stat-count.sh                         | 1 -
 t/t4050-diff-histogram.sh                          | 1 -
 t/t4051-diff-function-context.sh                   | 1 -
 t/t4052-stat-output.sh                             | 1 -
 t/t4053-diff-no-index.sh                           | 1 -
 t/t4054-diff-bogus-tree.sh                         | 1 -
 t/t4055-diff-context.sh                            | 1 -
 t/t4056-diff-order.sh                              | 1 -
 t/t4057-diff-combined-paths.sh                     | 1 -
 t/t4058-diff-duplicates.sh                         | 1 -
 t/t4059-diff-submodule-not-initialized.sh          | 1 -
 t/t4060-diff-submodule-option-diff-format.sh       | 1 -
 t/t4061-diff-indent.sh                             | 1 -
 t/t4062-diff-pickaxe.sh                            | 1 -
 t/t4063-diff-blobs.sh                              | 1 -
 t/t4064-diff-oidfind.sh                            | 1 -
 t/t4065-diff-anchored.sh                           | 1 -
 t/t4066-diff-emit-delay.sh                         | 1 -
 t/t4067-diff-partial-clone.sh                      | 1 -
 t/t4068-diff-symmetric-merge-base.sh               | 1 -
 t/t4069-remerge-diff.sh                            | 1 -
 t/t4100-apply-stat.sh                              | 1 -
 t/t4101-apply-nonl.sh                              | 1 -
 t/t4102-apply-rename.sh                            | 1 -
 t/t4103-apply-binary.sh                            | 1 -
 t/t4104-apply-boundary.sh                          | 1 -
 t/t4105-apply-fuzz.sh                              | 1 -
 t/t4106-apply-stdin.sh                             | 1 -
 t/t4107-apply-ignore-whitespace.sh                 | 1 -
 t/t4108-apply-threeway.sh                          | 1 -
 t/t4109-apply-multifrag.sh                         | 1 -
 t/t4110-apply-scan.sh                              | 1 -
 t/t4111-apply-subdir.sh                            | 1 -
 t/t4112-apply-renames.sh                           | 1 -
 t/t4113-apply-ending.sh                            | 1 -
 t/t4114-apply-typechange.sh                        | 1 -
 t/t4115-apply-symlink.sh                           | 1 -
 t/t4116-apply-reverse.sh                           | 1 -
 t/t4117-apply-reject.sh                            | 1 -
 t/t4118-apply-empty-context.sh                     | 1 -
 t/t4119-apply-config.sh                            | 1 -
 t/t4120-apply-popt.sh                              | 1 -
 t/t4121-apply-diffs.sh                             | 1 -
 t/t4122-apply-symlink-inside.sh                    | 1 -
 t/t4123-apply-shrink.sh                            | 1 -
 t/t4124-apply-ws-rule.sh                           | 1 -
 t/t4125-apply-ws-fuzz.sh                           | 1 -
 t/t4126-apply-empty.sh                             | 1 -
 t/t4127-apply-same-fn.sh                           | 1 -
 t/t4128-apply-root.sh                              | 1 -
 t/t4129-apply-samemode.sh                          | 1 -
 t/t4130-apply-criss-cross-rename.sh                | 1 -
 t/t4131-apply-fake-ancestor.sh                     | 1 -
 t/t4132-apply-removal.sh                           | 1 -
 t/t4133-apply-filenames.sh                         | 1 -
 t/t4134-apply-submodule.sh                         | 1 -
 t/t4135-apply-weird-filenames.sh                   | 1 -
 t/t4136-apply-check.sh                             | 1 -
 t/t4137-apply-submodule.sh                         | 1 -
 t/t4138-apply-ws-expansion.sh                      | 1 -
 t/t4139-apply-escape.sh                            | 1 -
 t/t4140-apply-ita.sh                               | 1 -
 t/t4141-apply-too-large.sh                         | 1 -
 t/t4150-am.sh                                      | 1 -
 t/t4151-am-abort.sh                                | 1 -
 t/t4152-am-subjects.sh                             | 1 -
 t/t4153-am-resume-override-opts.sh                 | 1 -
 t/t4200-rerere.sh                                  | 1 -
 t/t4201-shortlog.sh                                | 1 -
 t/t4202-log.sh                                     | 1 -
 t/t4203-mailmap.sh                                 | 1 -
 t/t4204-patch-id.sh                                | 1 -
 t/t4205-log-pretty-formats.sh                      | 1 -
 t/t4206-log-follow-harder-copies.sh                | 1 -
 t/t4207-log-decoration-colors.sh                   | 1 -
 t/t4208-log-magic-pathspec.sh                      | 1 -
 t/t4209-log-pickaxe.sh                             | 1 -
 t/t4210-log-i18n.sh                                | 1 -
 t/t4211-line-log.sh                                | 1 -
 t/t4212-log-corrupt.sh                             | 1 -
 t/t4213-log-tabexpand.sh                           | 1 -
 t/t4214-log-graph-octopus.sh                       | 1 -
 t/t4215-log-skewed-merges.sh                       | 1 -
 t/t4216-log-bloom.sh                               | 1 -
 t/t4217-log-limit.sh                               | 1 -
 t/t4252-am-options.sh                              | 1 -
 t/t4253-am-keep-cr-dos.sh                          | 1 -
 t/t4254-am-corrupt.sh                              | 1 -
 t/t4255-am-submodule.sh                            | 1 -
 t/t4256-am-format-flowed.sh                        | 1 -
 t/t4257-am-interactive.sh                          | 1 -
 t/t4258-am-quoted-cr.sh                            | 1 -
 t/t4300-merge-tree.sh                              | 1 -
 t/t4301-merge-tree-write-tree.sh                   | 1 -
 t/t5000-tar-tree.sh                                | 1 -
 t/t5001-archive-attr.sh                            | 1 -
 t/t5002-archive-attr-pattern.sh                    | 1 -
 t/t5003-archive-zip.sh                             | 1 -
 t/t5004-archive-corner-cases.sh                    | 1 -
 t/t5100-mailinfo.sh                                | 1 -
 t/t5150-request-pull.sh                            | 1 -
 t/t5200-update-server-info.sh                      | 1 -
 t/t5300-pack-object.sh                             | 1 -
 t/t5301-sliding-window.sh                          | 1 -
 t/t5302-pack-index.sh                              | 1 -
 t/t5303-pack-corruption-resilience.sh              | 1 -
 t/t5304-prune.sh                                   | 1 -
 t/t5305-include-tag.sh                             | 1 -
 t/t5306-pack-nobase.sh                             | 1 -
 t/t5307-pack-missing-commit.sh                     | 1 -
 t/t5308-pack-detect-duplicates.sh                  | 1 -
 t/t5309-pack-delta-cycles.sh                       | 1 -
 t/t5310-pack-bitmaps.sh                            | 1 -
 t/t5311-pack-bitmaps-shallow.sh                    | 1 -
 t/t5312-prune-corruption.sh                        | 1 -
 t/t5313-pack-bounds-checks.sh                      | 1 -
 t/t5314-pack-cycle-detection.sh                    | 1 -
 t/t5315-pack-objects-compression.sh                | 1 -
 t/t5316-pack-delta-depth.sh                        | 1 -
 t/t5317-pack-objects-filter-objects.sh             | 1 -
 t/t5318-commit-graph.sh                            | 1 -
 t/t5319-multi-pack-index.sh                        | 1 -
 t/t5320-delta-islands.sh                           | 1 -
 t/t5321-pack-large-objects.sh                      | 1 -
 t/t5322-pack-objects-sparse.sh                     | 1 -
 t/t5323-pack-redundant.sh                          | 1 -
 t/t5324-split-commit-graph.sh                      | 1 -
 t/t5325-reverse-index.sh                           | 1 -
 t/t5326-multi-pack-bitmaps.sh                      | 1 -
 t/t5327-multi-pack-bitmaps-rev.sh                  | 1 -
 t/t5328-commit-graph-64bit-time.sh                 | 1 -
 t/t5329-pack-objects-cruft.sh                      | 1 -
 t/t5330-no-lazy-fetch-with-commit-graph.sh         | 1 -
 t/t5331-pack-objects-stdin.sh                      | 1 -
 t/t5332-multi-pack-reuse.sh                        | 1 -
 t/t5333-pseudo-merge-bitmaps.sh                    | 1 -
 t/t5334-incremental-multi-pack-index.sh            | 1 -
 t/t5351-unpack-large-objects.sh                    | 1 -
 t/t5400-send-pack.sh                               | 1 -
 t/t5401-update-hooks.sh                            | 1 -
 t/t5402-post-merge-hook.sh                         | 1 -
 t/t5403-post-checkout-hook.sh                      | 1 -
 t/t5404-tracking-branches.sh                       | 1 -
 t/t5405-send-pack-rewind.sh                        | 1 -
 t/t5406-remote-rejects.sh                          | 1 -
 t/t5407-post-rewrite-hook.sh                       | 1 -
 t/t5408-send-pack-stdin.sh                         | 1 -
 t/t5409-colorize-remote-messages.sh                | 1 -
 t/t5410-receive-pack-alternates.sh                 | 1 -
 t/t5411-proc-receive-hook.sh                       | 1 -
 t/t5500-fetch-pack.sh                              | 1 -
 t/t5501-fetch-push-alternates.sh                   | 1 -
 t/t5502-quickfetch.sh                              | 1 -
 t/t5503-tagfollow.sh                               | 1 -
 t/t5504-fetch-receive-strict.sh                    | 1 -
 t/t5505-remote.sh                                  | 1 -
 t/t5506-remote-groups.sh                           | 1 -
 t/t5507-remote-environment.sh                      | 1 -
 t/t5509-fetch-push-namespaces.sh                   | 1 -
 t/t5510-fetch.sh                                   | 1 -
 t/t5511-refspec.sh                                 | 1 -
 t/t5512-ls-remote.sh                               | 1 -
 t/t5513-fetch-track.sh                             | 1 -
 t/t5514-fetch-multiple.sh                          | 1 -
 t/t5515-fetch-merge-logic.sh                       | 1 -
 t/t5516-fetch-push.sh                              | 1 -
 t/t5517-push-mirror.sh                             | 1 -
 t/t5518-fetch-exit-status.sh                       | 1 -
 t/t5519-push-alternates.sh                         | 1 -
 t/t5520-pull.sh                                    | 1 -
 t/t5521-pull-options.sh                            | 1 -
 t/t5522-pull-symlink.sh                            | 1 -
 t/t5523-push-upstream.sh                           | 1 -
 t/t5524-pull-msg.sh                                | 1 -
 t/t5525-fetch-tagopt.sh                            | 1 -
 t/t5526-fetch-submodules.sh                        | 1 -
 t/t5527-fetch-odd-refs.sh                          | 1 -
 t/t5528-push-default.sh                            | 1 -
 t/t5529-push-errors.sh                             | 1 -
 t/t5530-upload-pack-error.sh                       | 1 -
 t/t5531-deep-submodule-push.sh                     | 1 -
 t/t5532-fetch-proxy.sh                             | 1 -
 t/t5533-push-cas.sh                                | 1 -
 t/t5534-push-signed.sh                             | 1 -
 t/t5535-fetch-push-symref.sh                       | 1 -
 t/t5536-fetch-conflicts.sh                         | 1 -
 t/t5537-fetch-shallow.sh                           | 1 -
 t/t5538-push-shallow.sh                            | 1 -
 t/t5539-fetch-http-shallow.sh                      | 1 -
 t/t5540-http-push-webdav.sh                        | 1 -
 t/t5541-http-push-smart.sh                         | 1 -
 t/t5542-push-http-shallow.sh                       | 1 -
 t/t5543-atomic-push.sh                             | 1 -
 t/t5544-pack-objects-hook.sh                       | 1 -
 t/t5545-push-options.sh                            | 1 -
 t/t5546-receive-limits.sh                          | 1 -
 t/t5547-push-quarantine.sh                         | 1 -
 t/t5548-push-porcelain.sh                          | 1 -
 t/t5549-fetch-push-http.sh                         | 1 -
 t/t5550-http-fetch-dumb.sh                         | 1 -
 t/t5551-http-fetch-smart.sh                        | 1 -
 t/t5552-skipping-fetch-negotiator.sh               | 1 -
 t/t5553-set-upstream.sh                            | 1 -
 t/t5554-noop-fetch-negotiator.sh                   | 1 -
 t/t5555-http-smart-common.sh                       | 1 -
 t/t5557-http-get.sh                                | 1 -
 t/t5558-clone-bundle-uri.sh                        | 1 -
 t/t5560-http-backend-noserver.sh                   | 1 -
 t/t5561-http-backend.sh                            | 1 -
 t/t5562-http-backend-content-length.sh             | 1 -
 t/t5563-simple-http-auth.sh                        | 1 -
 t/t5564-http-proxy.sh                              | 1 -
 t/t5570-git-daemon.sh                              | 1 -
 t/t5571-pre-push-hook.sh                           | 1 -
 t/t5572-pull-submodule.sh                          | 1 -
 t/t5573-pull-verify-signatures.sh                  | 1 -
 t/t5574-fetch-output.sh                            | 1 -
 t/t5580-unc-paths.sh                               | 1 -
 t/t5581-http-curl-verbose.sh                       | 1 -
 t/t5582-fetch-negative-refspec.sh                  | 1 -
 t/t5583-push-branches.sh                           | 1 -
 t/t5600-clone-fail-cleanup.sh                      | 1 -
 t/t5601-clone.sh                                   | 1 -
 t/t5602-clone-remote-exec.sh                       | 1 -
 t/t5603-clone-dirname.sh                           | 1 -
 t/t5604-clone-reference.sh                         | 1 -
 t/t5605-clone-local.sh                             | 1 -
 t/t5606-clone-options.sh                           | 1 -
 t/t5607-clone-bundle.sh                            | 1 -
 t/t5609-clone-branch.sh                            | 1 -
 t/t5610-clone-detached.sh                          | 1 -
 t/t5611-clone-config.sh                            | 1 -
 t/t5612-clone-refspec.sh                           | 1 -
 t/t5613-info-alternate.sh                          | 1 -
 t/t5614-clone-submodules-shallow.sh                | 1 -
 t/t5615-alternate-env.sh                           | 1 -
 t/t5616-partial-clone.sh                           | 1 -
 t/t5617-clone-submodules-remote.sh                 | 1 -
 t/t5618-alternate-refs.sh                          | 1 -
 t/t5619-clone-local-ambiguous-transport.sh         | 1 -
 t/t5700-protocol-v1.sh                             | 1 -
 t/t5701-git-serve.sh                               | 1 -
 t/t5702-protocol-v2.sh                             | 1 -
 t/t5703-upload-pack-ref-in-want.sh                 | 1 -
 t/t5704-protocol-violations.sh                     | 1 -
 t/t5705-session-id-in-capabilities.sh              | 1 -
 t/t5730-protocol-v2-bundle-uri-file.sh             | 1 -
 t/t5731-protocol-v2-bundle-uri-git.sh              | 1 -
 t/t5732-protocol-v2-bundle-uri-http.sh             | 1 -
 t/t5750-bundle-uri-parse.sh                        | 1 -
 t/t5801-remote-helpers.sh                          | 1 -
 t/t5802-connect-helper.sh                          | 1 -
 t/t5810-proto-disable-local.sh                     | 1 -
 t/t5811-proto-disable-git.sh                       | 1 -
 t/t5812-proto-disable-http.sh                      | 1 -
 t/t5813-proto-disable-ssh.sh                       | 1 -
 t/t5814-proto-disable-ext.sh                       | 1 -
 t/t5815-submodule-protos.sh                        | 1 -
 t/t5900-repo-selection.sh                          | 1 -
 t/t6000-rev-list-misc.sh                           | 1 -
 t/t6001-rev-list-graft.sh                          | 1 -
 t/t6002-rev-list-bisect.sh                         | 1 -
 t/t6003-rev-list-topo-order.sh                     | 1 -
 t/t6004-rev-list-path-optim.sh                     | 1 -
 t/t6005-rev-list-count.sh                          | 1 -
 t/t6006-rev-list-format.sh                         | 1 -
 t/t6007-rev-list-cherry-pick-file.sh               | 1 -
 t/t6008-rev-list-submodule.sh                      | 1 -
 t/t6009-rev-list-parent.sh                         | 1 -
 t/t6010-merge-base.sh                              | 1 -
 t/t6011-rev-list-with-bad-commit.sh                | 1 -
 t/t6012-rev-list-simplify.sh                       | 1 -
 t/t6013-rev-list-reverse-parents.sh                | 1 -
 t/t6014-rev-list-all.sh                            | 1 -
 t/t6016-rev-list-graph-simplify-history.sh         | 1 -
 t/t6017-rev-list-stdin.sh                          | 1 -
 t/t6018-rev-list-glob.sh                           | 1 -
 t/t6019-rev-list-ancestry-path.sh                  | 1 -
 t/t6020-bundle-misc.sh                             | 1 -
 t/t6021-rev-list-exclude-hidden.sh                 | 1 -
 t/t6022-rev-list-missing.sh                        | 1 -
 t/t6030-bisect-porcelain.sh                        | 1 -
 t/t6040-tracking-info.sh                           | 1 -
 t/t6041-bisect-submodule.sh                        | 1 -
 t/t6050-replace.sh                                 | 1 -
 t/t6060-merge-index.sh                             | 1 -
 t/t6100-rev-list-in-order.sh                       | 1 -
 t/t6101-rev-parse-parents.sh                       | 1 -
 t/t6102-rev-list-unexpected-objects.sh             | 1 -
 t/t6110-rev-list-sparse.sh                         | 1 -
 t/t6111-rev-list-treesame.sh                       | 1 -
 t/t6112-rev-list-filters-objects.sh                | 1 -
 t/t6113-rev-list-bitmap-filters.sh                 | 1 -
 t/t6114-keep-packs.sh                              | 1 -
 t/t6115-rev-list-du.sh                             | 1 -
 t/t6120-describe.sh                                | 1 -
 t/t6130-pathspec-noglob.sh                         | 1 -
 t/t6131-pathspec-icase.sh                          | 1 -
 t/t6132-pathspec-exclude.sh                        | 1 -
 t/t6133-pathspec-rev-dwim.sh                       | 1 -
 t/t6134-pathspec-in-submodule.sh                   | 1 -
 t/t6135-pathspec-with-attrs.sh                     | 1 -
 t/t6136-pathspec-in-bare.sh                        | 1 -
 t/t6200-fmt-merge-msg.sh                           | 1 -
 t/t6300-for-each-ref.sh                            | 1 -
 t/t6301-for-each-ref-errors.sh                     | 1 -
 t/t6302-for-each-ref-filter.sh                     | 1 -
 t/t6400-merge-df.sh                                | 1 -
 t/t6401-merge-criss-cross.sh                       | 1 -
 t/t6402-merge-rename.sh                            | 1 -
 t/t6403-merge-file.sh                              | 1 -
 t/t6404-recursive-merge.sh                         | 1 -
 t/t6405-merge-symlinks.sh                          | 1 -
 t/t6406-merge-attr.sh                              | 1 -
 t/t6407-merge-binary.sh                            | 1 -
 t/t6408-merge-up-to-date.sh                        | 1 -
 t/t6409-merge-subtree.sh                           | 1 -
 t/t6411-merge-filemode.sh                          | 1 -
 t/t6412-merge-large-rename.sh                      | 1 -
 t/t6413-merge-crlf.sh                              | 1 -
 t/t6414-merge-rename-nocruft.sh                    | 1 -
 t/t6415-merge-dir-to-symlink.sh                    | 1 -
 t/t6416-recursive-corner-cases.sh                  | 1 -
 t/t6417-merge-ours-theirs.sh                       | 1 -
 t/t6418-merge-text-auto.sh                         | 1 -
 t/t6421-merge-partial-clone.sh                     | 1 -
 t/t6422-merge-rename-corner-cases.sh               | 1 -
 t/t6423-merge-rename-directories.sh                | 1 -
 t/t6424-merge-unrelated-index-changes.sh           | 1 -
 t/t6425-merge-rename-delete.sh                     | 1 -
 t/t6426-merge-skip-unneeded-updates.sh             | 1 -
 t/t6427-diff3-conflict-markers.sh                  | 1 -
 t/t6428-merge-conflicts-sparse.sh                  | 1 -
 t/t6429-merge-sequence-rename-caching.sh           | 1 -
 t/t6430-merge-recursive.sh                         | 1 -
 t/t6431-merge-criscross.sh                         | 1 -
 t/t6432-merge-recursive-space-options.sh           | 1 -
 t/t6433-merge-toplevel.sh                          | 1 -
 t/t6434-merge-recursive-rename-options.sh          | 1 -
 t/t6435-merge-sparse.sh                            | 1 -
 t/t6436-merge-overwrite.sh                         | 1 -
 t/t6437-submodule-merge.sh                         | 1 -
 t/t6438-submodule-directory-file-conflicts.sh      | 1 -
 t/t6439-merge-co-error-msgs.sh                     | 1 -
 t/t6500-gc.sh                                      | 1 -
 t/t6501-freshen-objects.sh                         | 1 -
 t/t6600-test-reach.sh                              | 1 -
 t/t6700-tree-depth.sh                              | 1 -
 t/t7001-mv.sh                                      | 1 -
 t/t7002-mv-sparse-checkout.sh                      | 1 -
 t/t7003-filter-branch.sh                           | 1 -
 t/t7004-tag.sh                                     | 1 -
 t/t7005-editor.sh                                  | 1 -
 t/t7006-pager.sh                                   | 1 -
 t/t7007-show.sh                                    | 1 -
 t/t7008-filter-branch-null-sha1.sh                 | 1 -
 t/t7010-setup.sh                                   | 1 -
 t/t7011-skip-worktree-reading.sh                   | 1 -
 t/t7012-skip-worktree-writing.sh                   | 1 -
 t/t7030-verify-tag.sh                              | 1 -
 t/t7031-verify-tag-signed-ssh.sh                   | 1 -
 t/t7060-wtstatus.sh                                | 1 -
 t/t7061-wtstatus-ignore.sh                         | 1 -
 t/t7062-wtstatus-ignorecase.sh                     | 1 -
 t/t7063-status-untracked-cache.sh                  | 1 -
 t/t7064-wtstatus-pv2.sh                            | 1 -
 t/t7101-reset-empty-subdirs.sh                     | 1 -
 t/t7102-reset.sh                                   | 1 -
 t/t7103-reset-bare.sh                              | 1 -
 t/t7104-reset-hard.sh                              | 1 -
 t/t7105-reset-patch.sh                             | 1 -
 t/t7106-reset-unborn-branch.sh                     | 1 -
 t/t7107-reset-pathspec-file.sh                     | 1 -
 t/t7110-reset-merge.sh                             | 1 -
 t/t7111-reset-table.sh                             | 1 -
 t/t7112-reset-submodule.sh                         | 1 -
 t/t7113-post-index-change-hook.sh                  | 1 -
 t/t7201-co.sh                                      | 1 -
 t/t7300-clean.sh                                   | 1 -
 t/t7301-clean-interactive.sh                       | 1 -
 t/t7400-submodule-basic.sh                         | 1 -
 t/t7401-submodule-summary.sh                       | 1 -
 t/t7402-submodule-rebase.sh                        | 1 -
 t/t7403-submodule-sync.sh                          | 1 -
 t/t7406-submodule-update.sh                        | 1 -
 t/t7407-submodule-foreach.sh                       | 1 -
 t/t7408-submodule-reference.sh                     | 1 -
 t/t7409-submodule-detached-work-tree.sh            | 1 -
 t/t7411-submodule-config.sh                        | 1 -
 t/t7412-submodule-absorbgitdirs.sh                 | 1 -
 t/t7413-submodule-is-active.sh                     | 1 -
 t/t7414-submodule-mistakes.sh                      | 1 -
 t/t7416-submodule-dash-url.sh                      | 1 -
 t/t7417-submodule-path-url.sh                      | 1 -
 t/t7418-submodule-sparse-gitmodules.sh             | 1 -
 t/t7419-submodule-set-branch.sh                    | 1 -
 t/t7420-submodule-set-url.sh                       | 1 -
 t/t7421-submodule-summary-add.sh                   | 1 -
 t/t7422-submodule-output.sh                        | 1 -
 t/t7423-submodule-symlinks.sh                      | 1 -
 t/t7424-submodule-mixed-ref-formats.sh             | 1 -
 t/t7450-bad-git-dotfiles.sh                        | 1 -
 t/t7500-commit-template-squash-signoff.sh          | 1 -
 t/t7501-commit-basic-functionality.sh              | 1 -
 t/t7502-commit-porcelain.sh                        | 1 -
 t/t7503-pre-commit-and-pre-merge-commit-hooks.sh   | 1 -
 t/t7504-commit-msg-hook.sh                         | 1 -
 t/t7505-prepare-commit-msg-hook.sh                 | 1 -
 t/t7506-status-submodule.sh                        | 1 -
 t/t7507-commit-verbose.sh                          | 1 -
 t/t7508-status.sh                                  | 1 -
 t/t7509-commit-authorship.sh                       | 1 -
 t/t7510-signed-commit.sh                           | 1 -
 t/t7511-status-index.sh                            | 1 -
 t/t7512-status-help.sh                             | 1 -
 t/t7513-interpret-trailers.sh                      | 1 -
 t/t7514-commit-patch.sh                            | 1 -
 t/t7515-status-symlinks.sh                         | 1 -
 t/t7516-commit-races.sh                            | 1 -
 t/t7517-per-repo-email.sh                          | 1 -
 t/t7518-ident-corner-cases.sh                      | 1 -
 t/t7519-status-fsmonitor.sh                        | 1 -
 t/t7520-ignored-hook-warning.sh                    | 1 -
 t/t7521-ignored-mode.sh                            | 1 -
 t/t7524-commit-summary.sh                          | 1 -
 t/t7525-status-rename.sh                           | 1 -
 t/t7526-commit-pathspec-file.sh                    | 1 -
 t/t7528-signed-commit-ssh.sh                       | 1 -
 t/t7600-merge.sh                                   | 1 -
 t/t7601-merge-pull-config.sh                       | 1 -
 t/t7602-merge-octopus-many.sh                      | 1 -
 t/t7603-merge-reduce-heads.sh                      | 1 -
 t/t7604-merge-custom-message.sh                    | 1 -
 t/t7605-merge-resolve.sh                           | 1 -
 t/t7606-merge-custom.sh                            | 1 -
 t/t7607-merge-state.sh                             | 1 -
 t/t7608-merge-messages.sh                          | 1 -
 t/t7609-mergetool--lib.sh                          | 1 -
 t/t7610-mergetool.sh                               | 1 -
 t/t7611-merge-abort.sh                             | 1 -
 t/t7612-merge-verify-signatures.sh                 | 1 -
 t/t7614-merge-signoff.sh                           | 1 -
 t/t7615-diff-algo-with-mergy-operations.sh         | 1 -
 t/t7700-repack.sh                                  | 1 -
 t/t7701-repack-unpack-unreachable.sh               | 1 -
 t/t7702-repack-cyclic-alternate.sh                 | 1 -
 t/t7703-repack-geometric.sh                        | 1 -
 t/t7704-repack-cruft.sh                            | 1 -
 t/t7800-difftool.sh                                | 1 -
 t/t7810-grep.sh                                    | 1 -
 t/t7811-grep-open.sh                               | 1 -
 t/t7812-grep-icase-non-ascii.sh                    | 1 -
 t/t7813-grep-icase-iso.sh                          | 1 -
 t/t7814-grep-recurse-submodules.sh                 | 1 -
 t/t7815-grep-binary.sh                             | 1 -
 t/t7816-grep-binary-pattern.sh                     | 1 -
 t/t7817-grep-sparse-checkout.sh                    | 1 -
 t/t7900-maintenance.sh                             | 1 -
 t/t8001-annotate.sh                                | 1 -
 t/t8002-blame.sh                                   | 1 -
 t/t8003-blame-corner-cases.sh                      | 1 -
 t/t8004-blame-with-conflicts.sh                    | 1 -
 t/t8005-blame-i18n.sh                              | 1 -
 t/t8006-blame-textconv.sh                          | 1 -
 t/t8007-cat-file-textconv.sh                       | 1 -
 t/t8008-blame-formats.sh                           | 1 -
 t/t8009-blame-vs-topicbranches.sh                  | 1 -
 t/t8010-cat-file-filters.sh                        | 1 -
 t/t8011-blame-split-file.sh                        | 1 -
 t/t8012-blame-colors.sh                            | 1 -
 t/t8013-blame-ignore-revs.sh                       | 1 -
 t/t8014-blame-ignore-fuzzy.sh                      | 1 -
 t/t9001-send-email.sh                              | 1 -
 t/t9002-column.sh                                  | 1 -
 t/t9003-help-autocorrect.sh                        | 1 -
 t/t9200-git-cvsexportcommit.sh                     | 1 -
 t/t9210-scalar.sh                                  | 1 -
 t/t9211-scalar-clone.sh                            | 1 -
 t/t9300-fast-import.sh                             | 1 -
 t/t9301-fast-import-notes.sh                       | 1 -
 t/t9302-fast-import-unpack-limit.sh                | 1 -
 t/t9303-fast-import-compression.sh                 | 1 -
 t/t9304-fast-import-marks.sh                       | 1 -
 t/t9350-fast-export.sh                             | 1 -
 t/t9351-fast-export-anonymize.sh                   | 1 -
 t/t9400-git-cvsserver-server.sh                    | 1 -
 t/t9401-git-cvsserver-crlf.sh                      | 1 -
 t/t9402-git-cvsserver-refs.sh                      | 1 -
 t/t9500-gitweb-standalone-no-errors.sh             | 1 -
 t/t9501-gitweb-standalone-http-status.sh           | 1 -
 t/t9502-gitweb-standalone-parse-output.sh          | 1 -
 t/t9600-cvsimport.sh                               | 1 -
 t/t9601-cvsimport-vendor-branch.sh                 | 1 -
 t/t9602-cvsimport-branches-tags.sh                 | 1 -
 t/t9603-cvsimport-patchsets.sh                     | 1 -
 t/t9604-cvsimport-timestamps.sh                    | 1 -
 t/t9700-perl-git.sh                                | 1 -
 t/t9800-git-p4-basic.sh                            | 1 -
 t/t9801-git-p4-branch.sh                           | 1 -
 t/t9802-git-p4-filetype.sh                         | 1 -
 t/t9803-git-p4-shell-metachars.sh                  | 1 -
 t/t9804-git-p4-label.sh                            | 1 -
 t/t9805-git-p4-skip-submit-edit.sh                 | 1 -
 t/t9806-git-p4-options.sh                          | 1 -
 t/t9808-git-p4-chdir.sh                            | 1 -
 t/t9809-git-p4-client-view.sh                      | 1 -
 t/t9810-git-p4-rcs.sh                              | 1 -
 t/t9811-git-p4-label-import.sh                     | 1 -
 t/t9812-git-p4-wildcards.sh                        | 1 -
 t/t9813-git-p4-preserve-users.sh                   | 1 -
 t/t9814-git-p4-rename.sh                           | 1 -
 t/t9815-git-p4-submit-fail.sh                      | 1 -
 t/t9816-git-p4-locked.sh                           | 1 -
 t/t9817-git-p4-exclude.sh                          | 1 -
 t/t9818-git-p4-block.sh                            | 1 -
 t/t9819-git-p4-case-folding.sh                     | 1 -
 t/t9820-git-p4-editor-handling.sh                  | 1 -
 t/t9821-git-p4-path-variations.sh                  | 1 -
 t/t9822-git-p4-path-encoding.sh                    | 1 -
 t/t9823-git-p4-mock-lfs.sh                         | 1 -
 t/t9825-git-p4-handle-utf16-without-bom.sh         | 1 -
 t/t9826-git-p4-keep-empty-commits.sh               | 1 -
 t/t9827-git-p4-change-filetype.sh                  | 1 -
 t/t9828-git-p4-map-user.sh                         | 1 -
 t/t9829-git-p4-jobs.sh                             | 1 -
 t/t9830-git-p4-symlink-dir.sh                      | 1 -
 t/t9831-git-p4-triggers.sh                         | 1 -
 t/t9832-unshelve.sh                                | 1 -
 t/t9833-errors.sh                                  | 1 -
 t/t9834-git-p4-file-dir-bug.sh                     | 1 -
 t/t9835-git-p4-metadata-encoding-python2.sh        | 1 -
 t/t9836-git-p4-metadata-encoding-python3.sh        | 1 -
 t/t9850-shell.sh                                   | 1 -
 t/t9901-git-web--browse.sh                         | 1 -
 t/t9902-completion.sh                              | 1 -
 t/t9903-bash-prompt.sh                             | 1 -
 928 files changed, 928 deletions(-)
t/t0001-init.sh +0 -1
index 0178aa62a41..4890dff4b27 100755
@@ -2,7 +2,6 @@
 
 test_description='git init'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_config () {
t/t0002-gitfile.sh +0 -1
index bf3bf604abe..dfbcdddbcc1 100755
@@ -7,7 +7,6 @@ Verify that plumbing commands work when .git is a file
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 objpath() {
t/t0003-attributes.sh +0 -1
index 66ccb5889d1..3c98b622f25 100755
@@ -2,7 +2,6 @@
 
 test_description=gitattributes
 
-TEST_PASSES_SANITIZE_LEAK=true
 TEST_CREATE_REPO_NO_TEMPLATE=1
 . ./test-lib.sh
 
t/t0004-unwritable.sh +0 -1
index 8114fac73b3..3bdafbae0f0 100755
@@ -2,7 +2,6 @@
 
 test_description='detect unwritable repository and fail correctly'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t0005-signals.sh +0 -1
index eba75a2490c..afba0fc3fc6 100755
@@ -2,7 +2,6 @@
 
 test_description='signals work as we expect'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >expect <<EOF
t/t0006-date.sh +0 -1
index fd373e1b391..53ced36df44 100755
@@ -2,7 +2,6 @@
 
 test_description='test date parsing and printing'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # arbitrary reference time: 2009-08-30 19:20:00
t/t0007-git-var.sh +0 -1
index 9fc58823873..2b60317758c 100755
@@ -2,7 +2,6 @@
 
 test_description='basic sanity checks for git var'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 sane_unset_all_editors () {
t/t0008-ignores.sh +0 -1
index 02a18d4fdbd..c9376dffb58 100755
@@ -2,7 +2,6 @@
 
 test_description=check-ignore
 
-TEST_PASSES_SANITIZE_LEAK=true
 TEST_CREATE_REPO_NO_TEMPLATE=1
 . ./test-lib.sh
 
t/t0010-racy-git.sh +0 -1
index 84172a37390..45229f57b82 100755
@@ -2,7 +2,6 @@
 
 test_description='racy GIT'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # This test can give false success if your machine is sufficiently
t/t0012-help.sh +0 -1
index 9eae0d83563..1d273d91c21 100755
@@ -2,7 +2,6 @@
 
 test_description='help'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 configure_help () {
t/t0013-sha1dc.sh +0 -1
index 08814173cb1..ce3d81227a0 100755
@@ -2,7 +2,6 @@
 
 test_description='test sha1 collision detection'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 TEST_DATA="$TEST_DIRECTORY/t0013"
 
t/t0014-alias.sh +0 -1
index 2a6f39ad9c8..854d59ec58c 100755
@@ -2,7 +2,6 @@
 
 test_description='git command aliasing'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'nested aliases - internal execution' '
t/t0017-env-helper.sh +0 -1
index f3a16859cc2..32fe8481792 100755
@@ -2,7 +2,6 @@
 
 test_description='test test-tool env-helper'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 
t/t0018-advice.sh +0 -1
index fac52322a7f..9a3db02fded 100755
@@ -5,7 +5,6 @@ test_description='Test advise_if_enabled functionality'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=trunk
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'advice should be printed when config variable is unset' '
t/t0019-json-writer.sh +0 -1
index 19a730c29ed..3a4e1cc7e38 100755
@@ -2,7 +2,6 @@
 
 test_description='test json-writer JSON generation'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'unit test of json-writer routines' '
t/t0020-crlf.sh +0 -1
index 81946e87ccb..fd1cae09edc 100755
@@ -5,7 +5,6 @@ test_description='CRLF conversion'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 has_cr() {
t/t0021-conversion.sh +0 -1
index 9e6c6ee0d44..3f6433d3045 100755
@@ -5,7 +5,6 @@ test_description='blob conversion via gitattributes'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
t/t0022-crlf-rename.sh +0 -1
index 9fe98912511..9bd863a970d 100755
@@ -2,7 +2,6 @@
 
 test_description='ignore CR in CRLF sequence while computing similiarity'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t0023-crlf-am.sh +0 -1
index 575805513a3..f9bbb91f64e 100755
@@ -2,7 +2,6 @@
 
 test_description='Test am with auto.crlf'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >patchfile <<\EOF
t/t0024-crlf-archive.sh +0 -1
index a7f4de4a43f..44958cb2c2d 100755
@@ -2,7 +2,6 @@
 
 test_description='respect crlf in git archive'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t0025-crlf-renormalize.sh +0 -1
index f7202c192e7..2e28feb69c9 100755
@@ -2,7 +2,6 @@
 
 test_description='CRLF renormalization'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t0026-eol-config.sh +0 -1
index f426a185bb9..493b01a0e7c 100755
@@ -2,7 +2,6 @@
 
 test_description='CRLF conversion'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 has_cr() {
t/t0027-auto-crlf.sh +0 -1
index 2f57c8669cb..49dbf09da77 100755
@@ -2,7 +2,6 @@
 
 test_description='CRLF conversion all combinations'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 compare_files () {
t/t0028-working-tree-encoding.sh +0 -1
index 510da4ca12d..50b3b4649b6 100755
@@ -5,7 +5,6 @@ test_description='working-tree-encoding conversion via gitattributes'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 TEST_CREATE_REPO_NO_TEMPLATE=1
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-encoding.sh"
t/t0029-core-unsetenvvars.sh +0 -1
index 4e8e90dd982..baa1b7e85b1 100755
@@ -2,7 +2,6 @@
 
 test_description='test the Windows-only core.unsetenvvars setting'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if ! test_have_prereq MINGW
t/t0030-stripspace.sh +0 -1
index f10f42ff1e4..43155f6bd86 100755
@@ -5,7 +5,6 @@
 
 test_description='git stripspace'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 t40='A quick brown fox jumps over the lazy do'
t/t0033-safe-directory.sh +0 -1
index e97a84764f7..e103fe71092 100755
@@ -2,7 +2,6 @@
 
 test_description='verify safe.directory checks'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 GIT_TEST_ASSUME_DIFFERENT_OWNER=1
t/t0035-safe-bare-repository.sh +0 -1
index d3cb2a1cb9e..ae7ef092abf 100755
@@ -2,7 +2,6 @@
 
 test_description='verify safe.bareRepository checks'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 pwd="$(pwd)"
t/t0040-parse-options.sh +0 -1
index 45a773642fd..2fe3522305f 100755
@@ -5,7 +5,6 @@
 
 test_description='our own option parser'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >expect <<\EOF
t/t0041-usage.sh +0 -1
index 1464294bd1b..a0f6f134c71 100755
@@ -5,7 +5,6 @@ test_description='Test commands behavior when given invalid argument value'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup ' '
t/t0050-filesystem.sh +0 -1
index 325eb1c3cd0..5c9dc90d0b0 100755
@@ -5,7 +5,6 @@ test_description='Various filesystem issues'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 auml=$(printf '\303\244')
t/t0052-simple-ipc.sh +0 -1
index 1a36a535743..ff98be31a51 100755
@@ -2,7 +2,6 @@
 
 test_description='simple command server'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test-tool simple-ipc SUPPORTS_SIMPLE_IPC || {
t/t0055-beyond-symlinks.sh +0 -1
index c3eb1158ef9..d0740038b87 100755
@@ -2,7 +2,6 @@
 
 test_description='update-index and add refuse to add beyond symlinks'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success SYMLINKS setup '
t/t0056-git-C.sh +0 -1
index 752aa8c9454..2630e756dab 100755
@@ -2,7 +2,6 @@
 
 test_description='"-C <path>" option and its effects on other path-related options'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success '"git -C <path>" runs git from the directory <path>' '
t/t0060-path-utils.sh +0 -1
index 0afa3d0d312..dbb2e73bcd9 100755
@@ -5,7 +5,6 @@
 
 test_description='Test various path utilities'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 norm_path() {
t/t0061-run-command.sh +0 -1
index 20986b693cf..76d4936a879 100755
@@ -5,7 +5,6 @@
 
 test_description='Test run command'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >hello-script <<-EOF
t/t0062-revision-walking.sh +0 -1
index b9480c81781..8e215867b8c 100755
@@ -5,7 +5,6 @@
 
 test_description='Test revision walking api'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >run_twice_expected <<-EOF
t/t0063-string-list.sh +0 -1
index 1fee6d90102..aac63ba5064 100755
@@ -5,7 +5,6 @@
 
 test_description='Test string list functionality'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_split () {
t/t0066-dir-iterator.sh +0 -1
index 7d0a0da8c01..df3e9f5fa5d 100755
@@ -2,7 +2,6 @@
 
 test_description='Test the dir-iterator functionality'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t0067-parse_pathspec_file.sh +0 -1
index 0188d0423a0..7bab49f361a 100755
@@ -2,7 +2,6 @@
 
 test_description='Test parse_pathspec_file()'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'one item from stdin' '
t/t0068-for-each-repo.sh +0 -1
index 95019e01ed3..f2f3e500312 100755
@@ -2,7 +2,6 @@
 
 test_description='git for-each-repo builtin'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'run based on configured value' '
t/t0070-fundamental.sh +0 -1
index 0ecec2ba711..6b9dcf984bc 100755
@@ -6,7 +6,6 @@ test_description='check that the most basic functions work
 Verify wrappers and compatibility functions.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'mktemp to nonexistent directory prints filename' '
t/t0071-sort.sh +0 -1
index ba8ad1d1ca0..2236a7e9563 100755
@@ -2,7 +2,6 @@
 
 test_description='verify sort functions'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'DEFINE_LIST_SORT_DEBUG' '
t/t0080-unit-test-output.sh +0 -1
index 3c369c88e2a..3db10f095c2 100755
@@ -2,7 +2,6 @@
 
 test_description='Test the output of the unit test framework'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'TAP output from unit tests' - <<\EOT
t/t0081-find-pack.sh +0 -1
index 67b11216a3e..5a628bf7356 100755
@@ -2,7 +2,6 @@
 
 test_description='test `test-tool find-pack`'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t0090-cache-tree.sh +0 -1
index d8e2fc42e15..ab80c9ef135 100755
@@ -6,7 +6,6 @@ Tests whether various commands properly update and/or rewrite the
 cache-tree extension.
 "
 
-TEST_PASSES_SANITIZE_LEAK=true
  . ./test-lib.sh
 
 cmp_cache_tree () {
t/t0091-bugreport.sh +0 -1
index fca39048fe8..e11d819b62a 100755
@@ -2,7 +2,6 @@
 
 test_description='git bugreport'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create a report' '
t/t0092-diagnose.sh +0 -1
index 133e5747d61..6cabd6e67b9 100755
@@ -2,7 +2,6 @@
 
 test_description='git diagnose'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success UNZIP 'creates diagnostics zip archive' '
t/t0095-bloom.sh +0 -1
index 08df74cacfc..8f0c3b7325b 100755
@@ -2,7 +2,6 @@
 
 test_description='Testing the various Bloom filter computations in bloom.c'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'compute unseeded murmur3 hash for empty string' '
t/t0100-previous.sh +0 -1
index 70a3223f219..dd5d9b4e5eb 100755
@@ -5,7 +5,6 @@ test_description='previous branch syntax @{-n}'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'branch -d @{-1}' '
t/t0101-at-syntax.sh +0 -1
index 878aadd64c9..023b4c6f0b3 100755
@@ -2,7 +2,6 @@
 
 test_description='various @{whatever} syntax tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t0200-gettext-basic.sh +0 -1
index 522fb2ae696..8853d8afb92 100755
@@ -5,7 +5,6 @@
 
 test_description='Gettext support for Git'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 
 test_expect_success "sanity: \$GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to $GIT_INTERNAL_GETTEXT_SH_SCHEME)" '
t/t0201-gettext-fallbacks.sh +0 -1
index 8724ce1052d..6c74df0dc67 100755
@@ -8,7 +8,6 @@ test_description='Gettext Shell fallbacks'
 GIT_INTERNAL_GETTEXT_TEST_FALLBACKS=YesPlease
 export GIT_INTERNAL_GETTEXT_TEST_FALLBACKS
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 
 test_expect_success "sanity: \$GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to $GIT_INTERNAL_GETTEXT_SH_SCHEME)" '
t/t0202-gettext-perl.sh +0 -1
index 5a6f28051bd..b15cb65d5d7 100755
@@ -5,7 +5,6 @@
 
 test_description='Perl gettext interface (Git::I18N)'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 . "$TEST_DIRECTORY"/lib-perl.sh
 skip_all_if_no_Test_More
t/t0203-gettext-setlocale-sanity.sh +0 -1
index 86cff324ff1..0ce1f22eff6 100755
@@ -5,7 +5,6 @@
 
 test_description="The Git C functions aren't broken by setlocale(3)"
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 
 test_expect_success 'git show a ISO-8859-1 commit under C locale' '
t/t0204-gettext-reencode-sanity.sh +0 -1
index 310a4500125..28d92bb9b7c 100755
@@ -5,7 +5,6 @@
 
 test_description="Gettext reencoding of our *.po/*.mo files works"
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 
 # The constants used in a tricky observation for undefined behaviour
t/t0210-trace2-normal.sh +0 -1
index b9adc94aab4..eff9a59dbd0 100755
@@ -2,7 +2,6 @@
 
 test_description='test trace2 facility (normal target)'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
t/t0211-trace2-perf.sh +0 -1
index 91260ce97e5..bac90465406 100755
@@ -2,7 +2,6 @@
 
 test_description='test trace2 facility (perf target)'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
t/t0212-trace2-event.sh +0 -1
index 147643d5826..1211db9f468 100755
@@ -2,7 +2,6 @@
 
 test_description='test trace2 facility'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
t/t0300-credentials.sh +0 -1
index 6a76b7fdbd4..17952e52d69 100755
@@ -2,7 +2,6 @@
 
 test_description='basic credential helper tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-credential.sh
 
t/t0301-credential-cache.sh +0 -1
index 5d5b64205ff..dc30289f753 100755
@@ -2,7 +2,6 @@
 
 test_description='credential-cache tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-credential.sh
 
t/t0302-credential-store.sh +0 -1
index f83db659e25..c1cd60edd01 100755
@@ -2,7 +2,6 @@
 
 test_description='credential-store tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-credential.sh
 
t/t0303-credential-external.sh +0 -1
index 8aadbe86c45..72ae405c3ed 100755
@@ -29,7 +29,6 @@ you can set GIT_TEST_CREDENTIAL_HELPER_SETUP to a sequence of shell
 commands.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-credential.sh
 
t/t0410-partial-clone.sh +0 -1
index 818700fbecd..34bdb3ab1f2 100755
@@ -2,7 +2,6 @@
 
 test_description='partial clone'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
t/t0411-clone-from-partial.sh +0 -1
index 932bf2067da..c98d5018695 100755
@@ -2,7 +2,6 @@
 
 test_description='check that local clone does not fetch from promisor remotes'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create evil repo' '
t/t0450-txt-doc-vs-help.sh +0 -1
index f99a69ae1b7..853101b86ef 100755
@@ -5,7 +5,6 @@ test_description='assert (unbuilt) Documentation/*.txt and -h output
 Run this with --debug to see a summary of where we still fail to make
 the two versions consistent with one another.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup: list of builtins' '
t/t0500-progress-display.sh +0 -1
index 1eb3a8306ba..d1a498a216f 100755
@@ -2,7 +2,6 @@
 
 test_description='progress display'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 show_cr () {
t/t0600-reffiles-backend.sh +0 -1
index bef2b708713..1e62c791d97 100755
@@ -7,7 +7,6 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 GIT_TEST_DEFAULT_REF_FORMAT=files
 export GIT_TEST_DEFAULT_REF_FORMAT
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t0601-reffiles-pack-refs.sh +0 -1
index d8cbd3f202b..aa7f6ecd813 100755
@@ -15,7 +15,6 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 GIT_TEST_DEFAULT_REF_FORMAT=files
 export GIT_TEST_DEFAULT_REF_FORMAT
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'enable reflogs' '
t/t0602-reffiles-fsck.sh +0 -1
index 71a4d1a5ae4..30e0a36242e 100755
@@ -6,7 +6,6 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 GIT_TEST_DEFAULT_REF_FORMAT=files
 export GIT_TEST_DEFAULT_REF_FORMAT
-TEST_PASSES_SANITIZE_LEAK=true
 
 . ./test-lib.sh
 
t/t0610-reftable-basics.sh +0 -1
index babec7993e3..67bf3a82f6e 100755
@@ -10,7 +10,6 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 GIT_TEST_DEFAULT_REF_FORMAT=reftable
 export GIT_TEST_DEFAULT_REF_FORMAT
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 INVALID_OID=$(test_oid 001)
t/t0611-reftable-httpd.sh +0 -1
index 2805995cc8c..5e05b9c1f2a 100755
@@ -2,7 +2,6 @@
 
 test_description='reftable HTTPD tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-httpd.sh
 
t/t0612-reftable-jgit-compatibility.sh +0 -1
index 84922153ab6..d0d7e80b492 100755
@@ -11,7 +11,6 @@ export GIT_TEST_DEFAULT_REF_FORMAT
 GIT_TEST_SPLIT_INDEX=0
 export GIT_TEST_SPLIT_INDEX
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if ! test_have_prereq JGIT
t/t0613-reftable-write-options.sh +0 -1
index b1c6c97524f..e2708e11d5b 100755
@@ -16,7 +16,6 @@ export GIT_TEST_DEFAULT_HASH
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'default write options' '
t/t1000-read-tree-m-3way.sh +0 -1
index 0e8c0dfbbee..b9dd21cfb6b 100755
@@ -72,7 +72,6 @@ In addition:
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 . "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh
t/t1001-read-tree-m-2way.sh +0 -1
index 48a1550371a..4a88bb9ef0c 100755
@@ -21,7 +21,6 @@ In the test, these paths are used:
 	yomin   - not in H or M
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
t/t1002-read-tree-m-u-2way.sh +0 -1
index a7c2ed0d7c0..df6ef537258 100755
@@ -9,7 +9,6 @@ This is identical to t1001, but uses -u to update the work tree as well.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
t/t1003-read-tree-prefix.sh +0 -1
index c860c08ecb4..66e2bf4aec3 100755
@@ -6,7 +6,6 @@
 test_description='git read-tree --prefix test.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t1004-read-tree-m-u-wf.sh +0 -1
index 2b9720b0feb..11bf10424f1 100755
@@ -5,7 +5,6 @@ test_description='read-tree -m -u checks working tree files'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
t/t1005-read-tree-reset.sh +0 -1
index 26be4a2b5a0..6b5033d0ce3 100755
@@ -2,7 +2,6 @@
 
 test_description='read-tree -u --reset'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
t/t1006-cat-file.sh +0 -1
index d36cd7c0863..ff9bf213aa2 100755
@@ -2,7 +2,6 @@
 
 test_description='git cat-file'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_cmdmode_usage () {
t/t1007-hash-object.sh +0 -1
index d73a5cc2370..a0481139de5 100755
@@ -2,7 +2,6 @@
 
 test_description="git hash-object"
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 echo_without_newline() {
t/t1008-read-tree-overlay.sh +0 -1
index ad5936e54d1..4512fb0b6e6 100755
@@ -5,7 +5,6 @@ test_description='test multi-tree read-tree without merging'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
t/t1009-read-tree-new-index.sh +0 -1
index fc179ac5dd6..2935f68f8d2 100755
@@ -5,7 +5,6 @@ test_description='test read-tree into a fresh index file'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t1010-mktree.sh +0 -1
index 22875ba598c..c291a2b33d7 100755
@@ -2,7 +2,6 @@
 
 test_description='git mktree'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t1011-read-tree-sparse-checkout.sh +0 -1
index 595b24c0adb..742f0fa909f 100755
@@ -12,7 +12,6 @@ test_description='sparse checkout tests
 '
 
 TEST_CREATE_REPO_NO_TEMPLATE=1
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
t/t1012-read-tree-df.sh +0 -1
index cde93d22cde..57f0770df14 100755
@@ -2,7 +2,6 @@
 
 test_description='read-tree D/F conflict corner cases'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
t/t1013-read-tree-submodule.sh +0 -1
index cf8b94ebedb..bfc90d4cf27 100755
@@ -2,7 +2,6 @@
 
 test_description='read-tree can handle submodules'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-submodule-update.sh
 
t/t1014-read-tree-confusing.sh +0 -1
index 8ea8d36818b..0c0e6da5cf5 100755
@@ -2,7 +2,6 @@
 
 test_description='check that read-tree rejects confusing paths'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create base tree' '
t/t1015-read-index-unmerged.sh +0 -1
index da737a32a27..9b965d02943 100755
@@ -2,7 +2,6 @@
 
 test_description='Test various callers of read_index_unmerged'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup modify/delete + directory/file conflict' '
t/t1016-compatObjectFormat.sh +0 -1
index 8341a2fe839..5641271b23a 100755
@@ -5,7 +5,6 @@
 
 test_description='Test how well compatObjectFormat works'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-gpg.sh
 
t/t1020-subdirectory.sh +0 -1
index 45eef9457fe..9fdbb2af80e 100755
@@ -6,7 +6,6 @@
 test_description='Try various core-level commands in subdirectory.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
t/t1021-rerere-in-workdir.sh +0 -1
index 69bf9476cbf..0b892894eb9 100755
@@ -4,7 +4,6 @@ test_description='rerere run in a workdir'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success SYMLINKS setup '
t/t1022-read-tree-partial-clone.sh +0 -1
index cca4380e431..d390d7d5f85 100755
@@ -3,7 +3,6 @@
 test_description='git read-tree in partial clones'
 
 TEST_NO_CREATE_REPO=1
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'read-tree in partial clone prefetches in one batch' '
t/t1050-large.sh +0 -1
index ed638f66447..c71932b0242 100755
@@ -3,7 +3,6 @@
 
 test_description='adding and checking out large blobs'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'core.bigFileThreshold must be non-negative' '
t/t1051-large-conversion.sh +0 -1
index f6709c9f569..361afb679b0 100755
@@ -2,7 +2,6 @@
 
 test_description='test conversion filters on large files'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 set_attr() {
t/t1060-object-corruption.sh +0 -1
index 5e0f0a334f4..502a5ea1c51 100755
@@ -2,7 +2,6 @@
 
 test_description='see how we handle various forms of corruption'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # convert "1234abcd" to ".git/objects/12/34abcd"
t/t1090-sparse-checkout-scope.sh +0 -1
index da0e7714d5a..3a14218b245 100755
@@ -6,7 +6,6 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 TEST_CREATE_REPO_NO_TEMPLATE=1
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1091-sparse-checkout-builtin.sh +0 -1
index 8c5cd651b4b..ab3a105ffff 100755
@@ -8,7 +8,6 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 GIT_TEST_SPLIT_INDEX=false
 export GIT_TEST_SPLIT_INDEX
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 list_files() {
t/t1092-sparse-checkout-compatibility.sh +0 -1
index 2157f37da36..a4c7c41fc00 100755
@@ -5,7 +5,6 @@ test_description='compare full workdir to sparse workdir'
 GIT_TEST_SPLIT_INDEX=0
 GIT_TEST_SPARSE_INDEX=
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1100-commit-tree-options.sh +0 -1
index 0f37a43fd3c..ae66ba5babf 100755
@@ -12,7 +12,6 @@ Also make sure that command line parser understands the normal
 "flags first and then non flag arguments" command line.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >expected <<EOF
t/t1300-config.sh +0 -1
index f13277c8f3e..51a85e83c27 100755
@@ -8,7 +8,6 @@ test_description='Test git config in different settings'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 for mode in legacy subcommands
t/t1301-shared-repo.sh +0 -1
index 29cf8a96613..630a47af21e 100755
@@ -9,7 +9,6 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 TEST_CREATE_REPO_NO_TEMPLATE=1
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Remove a default ACL from the test dir if possible.
t/t1302-repo-version.sh +0 -1
index 42caa0d2978..69723b88ff8 100755
@@ -5,7 +5,6 @@
 
 test_description='Test repository version check'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1303-wacky-config.sh +0 -1
index 0506f3d6bba..d971925ed02 100755
@@ -2,7 +2,6 @@
 
 test_description='Test wacky input to git config'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Leaving off the newline is intentional!
t/t1304-default-acl.sh +0 -1
index 31b89dd9693..c69ae41306c 100755
@@ -9,7 +9,6 @@ test_description='Test repository with default ACL'
 # => this must come before . ./test-lib.sh
 umask 077
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # We need an arbitrary other user give permission to using ACLs. root
t/t1305-config-include.sh +0 -1
index 517d6c86937..8ff2b0c232b 100755
@@ -1,7 +1,6 @@
 #!/bin/sh
 
 test_description='test config file include directives'
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Force setup_explicit_git_dir() to run until the end. This is needed
t/t1306-xdg-files.sh +0 -1
index 53e5b290b9b..40d3c42618c 100755
@@ -7,7 +7,6 @@
 
 test_description='Compatibility with $XDG_CONFIG_HOME/git/ files'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'read config: xdg file exists and ~/.gitconfig doesn'\''t' '
t/t1307-config-blob.sh +0 -1
index b9852fe40e4..5cb546dd00c 100755
@@ -2,7 +2,6 @@
 
 test_description='support for reading config from a blob'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create config blob' '
t/t1308-config-set.sh +0 -1
index 3bfec07f1ab..e0e49053f07 100755
@@ -2,7 +2,6 @@
 
 test_description='Test git config-set API in different settings'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # 'check_config get_* section.key value' verifies that the entry for
t/t1309-early-config.sh +0 -1
index 523aa99a1e2..9710ee0ca45 100755
@@ -2,7 +2,6 @@
 
 test_description='Test read_early_config()'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'read early config' '
t/t1310-config-default.sh +0 -1
index 1a90d31201a..69e64c6c868 100755
@@ -2,7 +2,6 @@
 
 test_description='Test git config in different settings (with --default)'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'uses --default when entry missing' '
t/t1350-config-hooks-path.sh +0 -1
index ceeb7ac3a47..45a04929170 100755
@@ -2,7 +2,6 @@
 
 test_description='Test the core.hooksPath configuration variable'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up a pre-commit hook in core.hooksPath' '
t/t1400-update-ref.sh +0 -1
index bb057596f1e..e2316f1dd4c 100755
@@ -5,7 +5,6 @@
 
 test_description='Test git update-ref and basic ref logging'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 Z=$ZERO_OID
t/t1401-symbolic-ref.sh +0 -1
index 90af3f955c0..a2a7e947164 100755
@@ -2,7 +2,6 @@
 
 test_description='basic symbolic-ref tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # If the tests munging HEAD fail, they can break detection of
t/t1402-check-ref-format.sh +0 -1
index 5ed9d7318e0..cabc516ae9a 100755
@@ -2,7 +2,6 @@
 
 test_description='Test git check-ref-format'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 valid_ref() {
t/t1403-show-ref.sh +0 -1
index 403f6b8f7da..9d698b3cc35 100755
@@ -4,7 +4,6 @@ test_description='show-ref'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t1404-update-ref-errors.sh +0 -1
index df90112618c..28e6c380d76 100755
@@ -2,7 +2,6 @@
 
 test_description='Test git update-ref error handling'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Create some references, perhaps run pack-refs --all, then try to
t/t1405-main-ref-store.sh +0 -1
index a6bcd62ab65..6d8f401a2a9 100755
@@ -5,7 +5,6 @@ test_description='test main ref store api'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 RUN="test-tool ref-store main"
t/t1406-submodule-ref-store.sh +0 -1
index c01f0f14a12..9b9e5d0766f 100755
@@ -5,7 +5,6 @@ test_description='test submodule ref store api'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 RUN="test-tool ref-store submodule:sub"
t/t1407-worktree-ref-store.sh +0 -1
index 48b1c92a414..9d8e1a13432 100755
@@ -5,7 +5,6 @@ test_description='test worktree ref store api'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 RWT="test-tool ref-store worktree:wt"
t/t1408-packed-refs.sh +0 -1
index 9469c79a585..41ba1f1d7fc 100755
@@ -5,7 +5,6 @@ test_description='packed-refs entries are covered by loose refs'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t1409-avoid-packing-refs.sh +0 -1
index 7748973733e..e3c501848a4 100755
@@ -2,7 +2,6 @@
 
 test_description='avoid rewriting packed-refs unnecessarily'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if test_have_prereq !REFFILES
t/t1410-reflog.sh +0 -1
index 246a3f46aba..388fdf9ae57 100755
@@ -7,7 +7,6 @@ test_description='Test prune and reflog expiration'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_have () {
t/t1411-reflog-show.sh +0 -1
index da581ec19ac..975c4ea83a8 100755
@@ -4,7 +4,6 @@ test_description='Test reflog display routines'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1412-reflog-loop.sh +0 -1
index ff30874f940..f7d69b66ff3 100755
@@ -2,7 +2,6 @@
 
 test_description='reflog walk shows repeated commits again'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup commits' '
t/t1413-reflog-detach.sh +0 -1
index d2a4822d46f..934688a1ee8 100755
@@ -4,7 +4,6 @@ test_description='Test reflog interaction with detached HEAD'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 reset_state () {
t/t1414-reflog-walk.sh +0 -1
index 49d28166da0..be6c3f472c1 100755
@@ -4,7 +4,6 @@ test_description='various tests of reflog walk (log -g) behavior'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up some reflog entries' '
t/t1415-worktree-refs.sh +0 -1
index eb4eec8becb..51d79bae83b 100755
@@ -2,7 +2,6 @@
 
 test_description='per-worktree refs'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1416-ref-transaction-hooks.sh +0 -1
index 5a812ca3c0b..dd003a196f7 100755
@@ -5,7 +5,6 @@ test_description='reference transaction hooks'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t1417-reflog-updateref.sh +0 -1
index 0eb5e674bc1..2f374025367 100755
@@ -2,7 +2,6 @@
 
 test_description='git reflog --updateref'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1418-reflog-exists.sh +0 -1
index 2268bca3c11..d51ecd5e925 100755
@@ -4,7 +4,6 @@ test_description='Test reflog display routines'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1419-exclude-refs.sh +0 -1
index 3256e4462f9..c04eeb72111 100755
@@ -5,7 +5,6 @@ test_description='test exclude_patterns functionality in main ref store'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 for_each_ref__exclude () {
t/t1420-lost-found.sh +0 -1
index dbe15a0be10..2fb2f44f021 100755
@@ -5,7 +5,6 @@
 
 test_description='Test fsck --lost-found'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t1430-bad-ref-name.sh +0 -1
index 0c00118c2b3..3ab65f72cde 100755
@@ -4,7 +4,6 @@ test_description='Test handling of ref names that check-ref-format rejects'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t1450-fsck.sh +0 -1
index 280cbf3e031..8a456b1142d 100755
@@ -6,7 +6,6 @@ test_description='git fsck random collection of tests
 * (main) A
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t1451-fsck-buffer.sh +0 -1
index 3413da40e4a..3a3d33f4054 100755
@@ -15,7 +15,6 @@ These tests _might_ catch such overruns in normal use, but should be run with
 ASan or valgrind for more confidence.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # the general idea for tags and commits is to build up the "base" file
t/t1460-refs-migrate.sh +0 -1
index f7c0783d30c..cf57cd66f2d 100755
@@ -5,7 +5,6 @@ test_description='migration of ref storage backends'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_migration () {
t/t1500-rev-parse.sh +0 -1
index 30c31918fde..bf2a90df948 100755
@@ -4,7 +4,6 @@ test_description='test git rev-parse'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_one () {
t/t1501-work-tree.sh +0 -1
index ae6528aecea..8c94ac2e70b 100755
@@ -2,7 +2,6 @@
 
 test_description='test separate work tree'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1502-rev-parse-parseopt.sh +0 -1
index 5eaa6428c43..3962f1d2882 100755
@@ -2,7 +2,6 @@
 
 test_description='test git rev-parse --parseopt'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_invalid_long_option () {
t/t1503-rev-parse-verify.sh +0 -1
index 79df65ec7f6..75a708f9ba5 100755
@@ -9,7 +9,6 @@ exec </dev/null
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 add_line_into_file()
t/t1504-ceiling-dirs.sh +0 -1
index c1679e31d8a..e04420f4368 100755
@@ -2,7 +2,6 @@
 
 test_description='test GIT_CEILING_DIRECTORIES'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_prefix() {
t/t1505-rev-parse-last.sh +0 -1
index 4a5758f08a8..2803ca9489c 100755
@@ -5,7 +5,6 @@ test_description='test @{-N} syntax'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 
t/t1506-rev-parse-diagnosis.sh +0 -1
index a3464976e3a..722884e65f4 100755
@@ -7,7 +7,6 @@ exec </dev/null
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_did_you_mean ()
t/t1507-rev-parse-upstream.sh +0 -1
index b9af6b3ac03..cb9ef7e329e 100755
@@ -5,7 +5,6 @@ test_description='test <branch>@{upstream} syntax'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 
t/t1508-at-combinations.sh +0 -1
index e841309d0ea..87a42864145 100755
@@ -4,7 +4,6 @@ test_description='test various @{X} syntax combinations together'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check() {
t/t1510-repo-setup.sh +0 -1
index 591505a39c0..bbfe05b8e4a 100755
@@ -43,7 +43,6 @@ A few rules for repo setup:
 # This test heavily relies on the standard error of nested function calls.
 test_untraceable=UnfortunatelyYes
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 here=$(pwd)
t/t1511-rev-parse-caret.sh +0 -1
index e7e78a40281..6ecfed86bc0 100755
@@ -5,7 +5,6 @@ test_description='tests for ref^{stuff}'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1512-rev-parse-disambiguation.sh +0 -1
index f9d68ce74ea..70f1e0a998e 100755
@@ -23,7 +23,6 @@ one tagged as v1.0.0.  They all have one regular file each.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_cmp_failed_rev_parse () {
t/t1513-rev-parse-prefix.sh +0 -1
index ba43387bf16..5f437be8c9e 100755
@@ -5,7 +5,6 @@ test_description='Tests for rev-parse --prefix'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1514-rev-parse-push.sh +0 -1
index a835a196aa8..d868a081105 100755
@@ -4,7 +4,6 @@ test_description='test <branch>@{push} syntax'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 resolve () {
t/t1515-rev-parse-outside-repo.sh +0 -1
index cdb26a30d72..75e89c4b6e2 100755
@@ -2,7 +2,6 @@
 
 test_description='check that certain rev-parse options work outside repo'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up non-repo directory' '
t/t1517-outside-repo.sh +0 -1
index 342defbb617..dbd8cd69063 100755
@@ -2,7 +2,6 @@
 
 test_description='check random commands outside repo'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up a non-repo directory and test file' '
t/t1600-index.sh +0 -1
index 62e7fd15964..03239e9faa4 100755
@@ -2,7 +2,6 @@
 
 test_description='index file specific tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 sane_unset GIT_TEST_SPLIT_INDEX
t/t1601-index-bogus.sh +0 -1
index 5dcc1018828..a45a8b4eb04 100755
@@ -2,7 +2,6 @@
 
 test_description='test handling of bogus index entries'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create tree with null sha1' '
t/t1700-split-index.sh +0 -1
index 2625ac44889..ac4a5b2734c 100755
@@ -5,7 +5,6 @@ test_description='split index mode tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # We need total control of index splitting here
t/t1701-racy-split-index.sh +0 -1
index d8fa489998a..5dc221ef382 100755
@@ -5,7 +5,6 @@
 
 test_description='racy split index'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t1800-hook.sh +0 -1
index 8b0234cf2d5..4feaf0d7bef 100755
@@ -2,7 +2,6 @@
 
 test_description='git-hook command'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
t/t2000-conflict-when-checking-files-out.sh +0 -1
index 79fc97f1d7e..f18616ad2be 100755
@@ -21,7 +21,6 @@ test_description='git conflicts when checking files out test.'
 # path1 is occupied by a non-directory.  With "-f" flag, it should remove
 # the conflicting paths and succeed.
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 show_files() {
t/t2002-checkout-cache-u.sh +0 -1
index fc95cf90485..70361c806e1 100755
@@ -8,7 +8,6 @@ test_description='git checkout-index -u test.
 With -u flag, git checkout-index internally runs the equivalent of
 git update-index --refresh on the checked out entry.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
t/t2003-checkout-cache-mkdir.sh +0 -1
index f0fd441d810..ff163cf6750 100755
@@ -10,7 +10,6 @@ also verifies that such leading path may contain symlinks, unlike
 the GIT controlled paths.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2004-checkout-cache-temp.sh +0 -1
index 98e818f09f2..b92d96fdc4e 100755
@@ -8,7 +8,6 @@ test_description='git checkout-index --temp test.
 With --temp flag, git checkout-index writes to temporary merge files
 rather than the tracked path.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2005-checkout-index-symlinks.sh +0 -1
index 67d18cfa104..91b08e03717 100755
@@ -8,7 +8,6 @@ test_description='git checkout-index on filesystem w/o symlinks test.
 This tests that git checkout-index creates a symbolic link as a plain
 file if core.symlinks is false.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
t/t2006-checkout-index-basic.sh +0 -1
index 570ba38580d..bac231b167c 100755
@@ -3,7 +3,6 @@
 test_description='basic checkout-index tests
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'checkout-index --gobbledegook' '
t/t2007-checkout-symlink.sh +0 -1
index bd9e9e7530d..6f0b90ce127 100755
@@ -7,7 +7,6 @@ test_description='git checkout to switch between branches with symlink<->dir'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2008-checkout-subdir.sh +0 -1
index 8a518a44ea2..eadb9434ae7 100755
@@ -4,7 +4,6 @@
 
 test_description='git checkout from subdirectories'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2009-checkout-statinfo.sh +0 -1
index 71195dd28f2..b0540636ae3 100755
@@ -5,7 +5,6 @@ test_description='checkout should leave clean stat info'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2010-checkout-ambiguous.sh +0 -1
index 82c3bfeac1a..3a3d56018e5 100755
@@ -5,7 +5,6 @@ test_description='checkout and pathspecs/refspecs ambiguities'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2011-checkout-invalid-head.sh +0 -1
index 04f53b1ea14..61417c75675 100755
@@ -5,7 +5,6 @@ test_description='checkout switching away from an invalid branch'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2012-checkout-last.sh +0 -1
index 4b6372f4c3e..1f6c4ed0428 100755
@@ -5,7 +5,6 @@ test_description='checkout can switch to last branch and merge base'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2013-checkout-submodule.sh +0 -1
index 3c1d663d948..b2bdd1fcb42 100755
@@ -2,7 +2,6 @@
 
 test_description='checkout can handle submodules'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-submodule-update.sh
 
t/t2014-checkout-switch.sh +0 -1
index c138bdde4fe..3e757c6e4e3 100755
@@ -2,7 +2,6 @@
 
 test_description='Peter MacMillan'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2015-checkout-unborn.sh +0 -1
index fb0e13881cd..1820300c62f 100755
@@ -4,7 +4,6 @@ test_description='checkout from unborn branch'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2016-checkout-patch.sh +0 -1
index c40b661ac12..c4f9bf09aa4 100755
@@ -2,7 +2,6 @@
 
 test_description='git checkout --patch'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-patch-mode.sh
 
 test_expect_success 'setup' '
t/t2017-checkout-orphan.sh +0 -1
index a5c7358eeab..80ac661815d 100755
@@ -10,7 +10,6 @@ Main Tests for --orphan functionality.'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 TEST_FILE=foo
t/t2018-checkout-branch.sh +0 -1
index 43551cc1481..a48ebdbf4d0 100755
@@ -3,7 +3,6 @@
 test_description='checkout'
 
 TEST_CREATE_REPO_NO_TEMPLATE=1
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Arguments: [!] <branch> <oid> [<checkout options>]
t/t2019-checkout-ambiguous-ref.sh +0 -1
index c67261e2b68..1fcef4be95c 100755
@@ -2,7 +2,6 @@
 
 test_description='checkout handling of ambiguous (branch/tag) refs'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup ambiguous refs' '
t/t2020-checkout-detach.sh +0 -1
index 8d90d028504..28bbbe6c055 100755
@@ -4,7 +4,6 @@ test_description='checkout into detached HEAD state'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_detached () {
t/t2021-checkout-overwrite.sh +0 -1
index ecfacf0f7f3..a5c03d5d4a2 100755
@@ -2,7 +2,6 @@
 
 test_description='checkout must not overwrite an untracked objects'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2022-checkout-paths.sh +0 -1
index f1b709d58be..c49ba7f9bd4 100755
@@ -4,7 +4,6 @@ test_description='checkout $tree -- $paths'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2023-checkout-m.sh +0 -1
index 81e772fb4eb..7b327b75449 100755
@@ -7,7 +7,6 @@ Ensures that checkout -m on a resolved file restores the conflicted file'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2024-checkout-dwim.sh +0 -1
index 2caada3d834..a3b1449ef11 100755
@@ -4,7 +4,6 @@ test_description='checkout <branch>
 
 Ensures that checkout on an unborn branch does what the user expects'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Is the current branch "refs/heads/$1"?
t/t2025-checkout-no-overlay.sh +0 -1
index 246609d54d0..dda169bbc4a 100755
@@ -2,7 +2,6 @@
 
 test_description='checkout --no-overlay <tree-ish> -- <pathspec>'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2026-checkout-pathspec-file.sh +0 -1
index acd55217a62..161da054b6d 100755
@@ -2,7 +2,6 @@
 
 test_description='checkout --pathspec-from-file'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_tick
t/t2027-checkout-track.sh +0 -1
index 98f16c72399..a397790df59 100755
@@ -5,7 +5,6 @@ test_description='tests for git branch --track'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2030-unresolve-info.sh +0 -1
index b3f6bc97b53..be3fcdde075 100755
@@ -5,7 +5,6 @@ test_description='undoing resolution'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_resolve_undo () {
t/t2050-git-dir-relative.sh +0 -1
index 1f193cde965..21f4659a9d1 100755
@@ -12,7 +12,6 @@ into the subdir while keeping the worktree location,
 and tries commits from the top and the subdir, checking
 that the commit-hook still gets called.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 COMMIT_FILE="$(pwd)/output"
t/t2060-switch.sh +0 -1
index 77b2346291b..c91c4db9361 100755
@@ -5,7 +5,6 @@ test_description='switch basic functionality'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2070-restore.sh +0 -1
index ac404945d4c..16d6348b692 100755
@@ -5,7 +5,6 @@ test_description='restore basic functionality'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2071-restore-patch.sh +0 -1
index 42d55221191..27e85be40ad 100755
@@ -2,7 +2,6 @@
 
 test_description='git restore --patch'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-patch-mode.sh
 
 test_expect_success 'setup' '
t/t2072-restore-pathspec-file.sh +0 -1
index 86c9c887881..8198a1e5789 100755
@@ -2,7 +2,6 @@
 
 test_description='restore --pathspec-from-file'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_tick
t/t2080-parallel-checkout-basics.sh +0 -1
index 59e5570cb2d..5ffe1a41e2c 100755
@@ -8,7 +8,6 @@ working tree.
 '
 
 TEST_NO_CREATE_REPO=1
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-parallel-checkout.sh"
 
t/t2081-parallel-checkout-collisions.sh +0 -1
index 6acdb89d12b..f6fcfc0c1e4 100755
@@ -11,7 +11,6 @@ The tests in this file exercise parallel checkout's collision detection code in
 both these mechanics.
 "
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-parallel-checkout.sh"
 
t/t2082-parallel-checkout-attributes.sh +0 -1
index d02d6a55504..79fb11f139a 100755
@@ -10,7 +10,6 @@ properly (without access to the index or attribute stack).
 '
 
 TEST_NO_CREATE_REPO=1
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-parallel-checkout.sh"
 . "$TEST_DIRECTORY/lib-encoding.sh"
t/t2100-update-cache-badpath.sh +0 -1
index 7915e7b8211..2df3fdde8bf 100755
@@ -22,7 +22,6 @@ and tries to git update-index --add the following:
 All of the attempts should fail.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 mkdir path2 path3
t/t2101-update-index-reupdate.sh +0 -1
index e3c7acdbf91..6c32d42c8c6 100755
@@ -6,7 +6,6 @@
 test_description='git update-index --again test.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'update-index --add' '
t/t2102-update-index-symlinks.sh +0 -1
index c49cdfb6e58..9b11130ab93 100755
@@ -8,7 +8,6 @@ test_description='git update-index on filesystem w/o symlinks test.
 This tests that git update-index keeps the symbolic link property
 even if a plain file is in the working tree if core.symlinks is false.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
t/t2103-update-index-ignore-missing.sh +0 -1
index e9451cd567c..6938ecca868 100755
@@ -2,7 +2,6 @@
 
 test_description='update-index with options'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success basics '
t/t2104-update-index-skip-worktree.sh +0 -1
index 7ec7f30b442..7a0778ed983 100755
@@ -5,7 +5,6 @@
 
 test_description='skip-worktree bit test'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 sane_unset GIT_TEST_SPLIT_INDEX
t/t2105-update-index-gitfile.sh +0 -1
index 963ebe77eb6..a7f3d47aec2 100755
@@ -6,7 +6,6 @@
 test_description='git update-index for gitlink to .git file.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'submodule with absolute .git file' '
t/t2106-update-index-assume-unchanged.sh +0 -1
index 95c004dc5c5..6b2ccc21a93 100755
@@ -3,7 +3,6 @@
 test_description='git update-index --assume-unchanged test.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2107-update-index-basic.sh +0 -1
index f0eab13f96a..cc72ead79f3 100755
@@ -5,7 +5,6 @@ test_description='basic update-index tests
 Tests for command-line parsing and basic operation.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'update-index --nonsense fails' '
t/t2108-update-index-refresh-racy.sh +0 -1
index bc5f2886faf..b31dd8ece50 100755
@@ -2,7 +2,6 @@
 
 test_description='update-index refresh tests related to racy timestamps'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 reset_files () {
t/t2200-add-update.sh +0 -1
index df235ac306e..06e83d33333 100755
@@ -14,7 +14,6 @@ only the updates to dir/sub.
 Also tested are "git add -u" without limiting, and "git add -u"
 without contents changes, and other conditions'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2201-add-update-typechange.sh +0 -1
index dba62d69c6c..687be974d41 100755
@@ -2,7 +2,6 @@
 
 test_description='more git add -u'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2202-add-addremove.sh +0 -1
index 24c60bfd790..9ee659098c4 100755
@@ -2,7 +2,6 @@
 
 test_description='git add --all'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2203-add-intent.sh +0 -1
index 8fa44a92a27..192ad14b5f4 100755
@@ -2,7 +2,6 @@
 
 test_description='Intent to add'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'intent to add' '
t/t2204-add-ignored.sh +0 -1
index b7cf1e492c1..31eb233df51 100755
@@ -2,7 +2,6 @@
 
 test_description='giving ignored paths to git add'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2205-add-worktree-config.sh +0 -1
index 98265ba1b49..43d950de640 100755
@@ -17,7 +17,6 @@ outside the repository.  Two instances for which this can occur are tested:
 	   repository can be added to the index.
 	'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success '1a: setup--config worktree' '
t/t2300-cd-to-toplevel.sh +0 -1
index b40eeb263fe..c8de6d8a190 100755
@@ -2,7 +2,6 @@
 
 test_description='cd_to_toplevel'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 EXEC_PATH="$(git --exec-path)"
t/t2400-worktree-add.sh +0 -1
index cfc4aeb1798..ba320dc4171 100755
@@ -6,7 +6,6 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 TEST_CREATE_REPO_NO_TEMPLATE=1
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
t/t2401-worktree-prune.sh +0 -1
index 976d048e3ef..aa5b42c0f7b 100755
@@ -5,7 +5,6 @@ test_description='prune $GIT_DIR/worktrees'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success initialize '
t/t2402-worktree-list.sh +0 -1
index 33ea9cb21ba..cb125ec2265 100755
@@ -5,7 +5,6 @@ test_description='test git worktree list'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2403-worktree-move.sh +0 -1
index 901342ea09b..08531deb5b2 100755
@@ -2,7 +2,6 @@
 
 test_description='test git worktree move, remove, lock and unlock'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2404-worktree-config.sh +0 -1
index 842937bfb9a..9536d109195 100755
@@ -2,7 +2,6 @@
 
 test_description="config file in multi worktree"
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2405-worktree-submodule.sh +0 -1
index 1d7f6056338..11018f37c70 100755
@@ -5,7 +5,6 @@ test_description='Combination of submodules and multiple worktrees'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 base_path=$(pwd -P)
t/t2406-worktree-repair.sh +0 -1
index 7686e60f6ad..bf340b87726 100755
@@ -2,7 +2,6 @@
 
 test_description='test git worktree repair'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t2407-worktree-heads.sh +0 -1
index 7750dc9265a..57c201869f0 100755
@@ -2,7 +2,6 @@
 
 test_description='test operations trying to overwrite refs at worktree HEAD'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t2408-worktree-relative.sh +0 -1
index a3136db7e28..d51cc8c5ab7 100755
@@ -2,7 +2,6 @@
 
 test_description='test worktrees linked with relative paths'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'links worktrees with relative paths' '
t/t2500-untracked-overwriting.sh +0 -1
index 714feb83be5..5c0bf4d21fc 100755
@@ -2,7 +2,6 @@
 
 test_description='Test handling of overwriting untracked files'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_setup_reset () {
t/t2501-cwd-empty.sh +0 -1
index 8af4e8cfe3c..f6d8d7d03d7 100755
@@ -2,7 +2,6 @@
 
 test_description='Test handling of the current working directory becoming empty'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3000-ls-files-others.sh +0 -1
index 11af4552f74..13f66fd649d 100755
@@ -16,7 +16,6 @@ filesystem.
     path4       - an empty directory
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup ' '
t/t3001-ls-files-others-exclude.sh +0 -1
index 1ed0aa967ec..4b676462852 100755
@@ -8,7 +8,6 @@ test_description='git ls-files --others --exclude
 This test runs git ls-files --others and tests --exclude patterns.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 rm -fr one three
t/t3002-ls-files-dashpath.sh +0 -1
index 4dd24550eba..31462cb441e 100755
@@ -13,7 +13,6 @@ filesystem.
     --		- another file with a funny name.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3003-ls-files-exclude.sh +0 -1
index 7933dff9b38..ac3c811f464 100755
@@ -2,7 +2,6 @@
 
 test_description='ls-files --exclude does not affect index files'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create repo with file' '
t/t3004-ls-files-basic.sh +0 -1
index 12e41a7b40e..a1078f8701d 100755
@@ -6,7 +6,6 @@ This test runs git ls-files with various unusual or malformed
 command-line arguments.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'ls-files in empty repository' '
t/t3005-ls-files-relative.sh +0 -1
index fbfa210a50b..db13aabf625 100755
@@ -5,7 +5,6 @@ test_description='ls-files tests with relative paths
 This test runs git ls-files with various relative path arguments.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'prepare' '
t/t3006-ls-files-long.sh +0 -1
index 2aaf91ebc8c..22c7256c3ae 100755
@@ -2,7 +2,6 @@
 
 test_description='overly long paths'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3007-ls-files-recurse-submodules.sh +0 -1
index f04bdc8c78b..61771eec830 100755
@@ -6,7 +6,6 @@ This test verifies the recurse-submodules feature correctly lists files from
 submodules.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup directory structure and submodules' '
t/t3008-ls-files-lazy-init-name-hash.sh +0 -1
index 51d3dffaa66..85f37049587 100755
@@ -2,7 +2,6 @@
 
 test_description='Test the lazy init name hash with various folder structures'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if test 1 -eq $(test-tool online-cpus)
t/t3009-ls-files-others-nonsubmodule.sh +0 -1
index 14218b34243..963f3462b75 100755
@@ -18,7 +18,6 @@ This test runs git ls-files --others with the following working tree:
       git repository with a commit and an untracked file
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup: directories' '
t/t3010-ls-files-killed-modified.sh +0 -1
index 054178703d7..7af4532cd1d 100755
@@ -42,7 +42,6 @@ We should report path0, path1, path2/file2, path3/file3, path7 and path8
 modified without reporting path9 and path10.  submod1 is also modified.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'git update-index --add to add various paths.' '
t/t3011-common-prefixes-and-directory-traversal.sh +0 -1
index 69e44c387fa..3da5b2b6e79 100755
@@ -2,7 +2,6 @@
 
 test_description='directory traversal handling, especially with common prefixes'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3012-ls-files-dedup.sh +0 -1
index 190e2f6eed7..2682b1f43a6 100755
@@ -2,7 +2,6 @@
 
 test_description='git ls-files --deduplicate test'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3013-ls-files-format.sh +0 -1
index 6e6ea0b6f3c..8bdaacd85ac 100755
@@ -2,7 +2,6 @@
 
 test_description='git ls-files --format test'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 for flag in -s -o -k -t --resolve-undo --deduplicate --eol
t/t3020-ls-files-error-unmatch.sh +0 -1
index 133593d23c0..ac82c9cee8a 100755
@@ -10,7 +10,6 @@ returns an error when a non-existent path is provided on the command
 line.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3040-subprojects-basic.sh +0 -1
index bd65dfcffc7..768d702fbbf 100755
@@ -2,7 +2,6 @@
 
 test_description='Basic subproject functionality'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup: create superproject' '
t/t3050-subprojects-fetch.sh +0 -1
index 38846941655..f1f09abdd9b 100755
@@ -2,7 +2,6 @@
 
 test_description='fetching and pushing project with subproject'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3060-ls-files-with-tree.sh +0 -1
index 5a06732ca73..eb69da61fe7 100755
@@ -9,7 +9,6 @@ This test runs git ls-files --with-tree and in particular in
 a scenario known to trigger a crash with some versions of git.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3070-wildmatch.sh +0 -1
index 4dd42df38c2..3da824117c6 100755
@@ -2,7 +2,6 @@
 
 test_description='wildmatch tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 should_create_test_file() {
t/t3100-ls-tree-restrict.sh +0 -1
index 436de44971e..8f294d98326 100755
@@ -17,7 +17,6 @@ The new path restriction code should do the right thing for path2 and
 path2/baz.  Also path0/ should snow nothing.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
t/t3101-ls-tree-dirname.sh +0 -1
index 5af2dac0e4b..ac44525810f 100755
@@ -20,7 +20,6 @@ Test the handling of multiple directories which have matching file
 entries.  Also test odd filename and missing entries handling.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3102-ls-tree-wildcards.sh +0 -1
index 3942db22900..1e16c6b8ea6 100755
@@ -2,7 +2,6 @@
 
 test_description='ls-tree with(out) globs'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3103-ls-tree-misc.sh +0 -1
index 81c63439623..e7636f6908f 100755
@@ -7,7 +7,6 @@ Miscellaneous tests for git ls-tree.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3104-ls-tree-format.sh +0 -1
index 3adb206a93b..a1b2069a256 100755
@@ -2,7 +2,6 @@
 
 test_description='ls-tree --format'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-t3100.sh
 
t/t3105-ls-tree-output.sh +0 -1
index ce2391e28be..8bdf400682d 100755
@@ -2,7 +2,6 @@
 
 test_description='ls-tree output'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-t3100.sh
 
t/t3200-branch.sh +0 -1
index ccfa6a720d0..2295db3dcb0 100755
@@ -8,7 +8,6 @@ test_description='git branch assorted tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
t/t3201-branch-contains.sh +0 -1
index 6e587d27d7a..800fc33165a 100755
@@ -2,7 +2,6 @@
 
 test_description='branch --contains <commit>, --no-contains <commit> --merged, and --no-merged'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3202-show-branch.sh +0 -1
index 3b6dad0c466..a1139f79e2c 100755
@@ -2,7 +2,6 @@
 
 test_description='test show-branch'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'error descriptions on empty repository' '
t/t3203-branch-output.sh +0 -1
index e627f08a179..500c9d0e727 100755
@@ -2,7 +2,6 @@
 
 test_description='git branch display tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
t/t3204-branch-name-interpretation.sh +0 -1
index 594e3e43e12..3399344f25d 100755
@@ -9,7 +9,6 @@ This script aims to check the behavior of those corner cases.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 expect_branch() {
t/t3205-branch-color.sh +0 -1
index 0b61da92b37..da1c202fa71 100755
@@ -1,7 +1,6 @@
 #!/bin/sh
 
 test_description='basic branch output coloring'
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up some sample branches' '
t/t3206-range-diff.sh +0 -1
index 86010931ab6..d2ca43d6aab 100755
@@ -5,7 +5,6 @@ test_description='range-diff tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Note that because of the range-diff's heuristics, test_commit does more
t/t3207-branch-submodule.sh +0 -1
index 904eea7df59..fe72b247164 100755
@@ -5,7 +5,6 @@ test_description='git branch submodule tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
t/t3211-peel-ref.sh +0 -1
index 9cbc34fc583..37b9d26f4b6 100755
@@ -4,7 +4,6 @@ test_description='tests for the peel_ref optimization of packed-refs'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create annotated tag in refs/tags' '
t/t3300-funny-names.sh +0 -1
index d3ac826283e..f5bf16abcd8 100755
@@ -9,7 +9,6 @@ This test tries pathnames with funny characters in the working
 tree, index, and tree objects.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 HT='	'
t/t3301-notes.sh +0 -1
index 813dfd8db97..d6c50460d08 100755
@@ -5,7 +5,6 @@
 
 test_description='Test commit notes'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 write_script fake_editor <<\EOF
t/t3302-notes-index-expensive.sh +0 -1
index d0c4d38b4d4..bb5fea02a03 100755
@@ -8,7 +8,6 @@ test_description='Test commit notes index (expensive!)'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 create_repo () {
t/t3303-notes-subtrees.sh +0 -1
index bc9b791d1b9..eac193757bf 100755
@@ -5,7 +5,6 @@ test_description='Test commit notes organized in subtrees'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 number_of_commits=100
t/t3304-notes-mixed.sh +0 -1
index 2c3a2452668..03dfcd3954c 100755
@@ -5,7 +5,6 @@ test_description='Test notes trees that also contain non-notes'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 number_of_commits=100
t/t3305-notes-fanout.sh +0 -1
index 1ec1fb6715e..fcecdc94ff7 100755
@@ -2,7 +2,6 @@
 
 test_description='Test that adding/removing many notes triggers automatic fanout restructuring'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 path_has_fanout() {
t/t3306-notes-prune.sh +0 -1
index b6e9f643e3c..8f4102ff9e4 100755
@@ -2,7 +2,6 @@
 
 test_description='Test git notes prune'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup: create a few commits with notes' '
t/t3307-notes-man.sh +0 -1
index ae316502c45..1aa366a410e 100755
@@ -4,7 +4,6 @@ test_description='Examples from the git-notes man page
 
 Make sure the manual is not full of lies.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3308-notes-merge.sh +0 -1
index e1d05ff6bc9..202702be1a7 100755
@@ -5,7 +5,6 @@
 
 test_description='Test merging of notes trees'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3309-notes-merge-auto-resolve.sh +0 -1
index f55277f499d..9bd5dbf341f 100755
@@ -5,7 +5,6 @@
 
 test_description='Test notes merging with auto-resolving strategies'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Set up a notes merge scenario with all kinds of potential conflicts
t/t3310-notes-merge-manual-resolve.sh +0 -1
index 04866b89bed..597df5ebc0a 100755
@@ -5,7 +5,6 @@
 
 test_description='Test notes merging with manual conflict resolution'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Set up a notes merge scenario with different kinds of conflicts
t/t3311-notes-merge-fanout.sh +0 -1
index ce4144db0f2..5b675417e9b 100755
@@ -5,7 +5,6 @@
 
 test_description='Test notes merging at various fanout levels'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 verify_notes () {
t/t3320-notes-merge-worktrees.sh +0 -1
index 0fd33280cf9..96243b72222 100755
@@ -8,7 +8,6 @@ test_description='Test merging of notes trees in multiple worktrees'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup commit' '
t/t3321-notes-stripspace.sh +0 -1
index beca3460567..c4a7839540a 100755
@@ -5,7 +5,6 @@
 
 test_description='Test commit notes with stripspace behavior'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 MULTI_LF="$LF$LF$LF"
t/t3400-rebase.sh +0 -1
index 09f230eefb2..bab675938a3 100755
@@ -11,7 +11,6 @@ among other things.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 GIT_AUTHOR_NAME=author@name
t/t3401-rebase-and-am-rename.sh +0 -1
index 328c1d3a3f4..f18bae94507 100755
@@ -2,7 +2,6 @@
 
 test_description='git rebase + directory rename tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
t/t3402-rebase-merge.sh +0 -1
index 5c67d07ba3e..761de63b6b9 100755
@@ -8,7 +8,6 @@ test_description='git rebase --merge test'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 T="A quick brown fox
t/t3403-rebase-skip.sh +0 -1
index 4f1d6e8ea64..a1911c4a9d6 100755
@@ -8,7 +8,6 @@ test_description='git rebase --merge --skip tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
t/t3404-rebase-interactive.sh +0 -1
index 77cceda14a0..b11f04eb334 100755
@@ -26,7 +26,6 @@ Initial setup:
  touch file "conflict".
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
t/t3405-rebase-malformed.sh +0 -1
index 8979bc34073..25243318618 100755
@@ -5,7 +5,6 @@ test_description='rebase should handle arbitrary git message'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
t/t3406-rebase-message.sh +0 -1
index 82108b67e67..a1d7fa7f7c6 100755
@@ -5,7 +5,6 @@ test_description='messages from rebase operation'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3407-rebase-abort.sh +0 -1
index 2c3f38d45a8..9f49c4228b6 100755
@@ -5,7 +5,6 @@ test_description='git rebase --abort tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3408-rebase-multi-line.sh +0 -1
index 7b4607d72f2..cde3562e3a6 100755
@@ -5,7 +5,6 @@ test_description='rebasing a commit with multi-line first paragraph.'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3409-rebase-environ.sh +0 -1
index acaf5558dbe..83ffb39d9ff 100755
@@ -2,7 +2,6 @@
 
 test_description='git rebase interactive environment'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3412-rebase-root.sh +0 -1
index e75b3d0e07c..58371d8a547 100755
@@ -7,7 +7,6 @@ Tests if git rebase --root --onto <newparent> can rebase the root commit.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 log_with_names () {
t/t3413-rebase-hook.sh +0 -1
index 426ff098e1d..b4ff614987e 100755
@@ -5,7 +5,6 @@ test_description='git rebase with its hook(s)'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3415-rebase-autosquash.sh +0 -1
index 22452ff84cb..fcc40d6fe1f 100755
@@ -5,7 +5,6 @@ test_description='auto squash'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
t/t3416-rebase-onto-threedots.sh +0 -1
index f8c4ed78c9e..ea501f2b42b 100755
@@ -5,7 +5,6 @@ test_description='git rebase --onto A...B'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-rebase.sh"
 
t/t3417-rebase-whitespace-fix.sh +0 -1
index 22ee3a20459..96f2cf22faf 100755
@@ -5,7 +5,6 @@ test_description='git rebase --whitespace=fix
 This test runs git rebase --whitespace=fix and make sure that it works.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # prepare initial revision of "file" with a blank line at the end
t/t3418-rebase-continue.sh +0 -1
index c0d29c2154f..127216f7225 100755
@@ -5,7 +5,6 @@ test_description='git rebase --continue tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
t/t3419-rebase-patch-id.sh +0 -1
index 6c61f240cf9..7181f176b81 100755
@@ -5,7 +5,6 @@ test_description='git rebase - test patch id computation'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 scramble () {
t/t3420-rebase-autostash.sh +0 -1
index b43046b3b0d..ad3ba6a9848 100755
@@ -7,7 +7,6 @@ test_description='git rebase --autostash tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3421-rebase-topology-linear.sh +0 -1
index 737af80bb3d..f5b7807abd0 100755
@@ -2,7 +2,6 @@
 
 test_description='basic rebase topology tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
t/t3422-rebase-incompatible-options.sh +0 -1
index b40f26250b7..b9408f9ba12 100755
@@ -2,7 +2,6 @@
 
 test_description='test if rebase detects and aborts on incompatible options'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3423-rebase-reword.sh +0 -1
index 2fab703d615..4859bb8f722 100755
@@ -2,7 +2,6 @@
 
 test_description='git rebase interactive with rewording'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
t/t3424-rebase-empty.sh +0 -1
index 515c949ae37..1ee6b00fd57 100755
@@ -2,7 +2,6 @@
 
 test_description='git rebase of commits that start or become empty'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup test repository' '
t/t3425-rebase-topology-merges.sh +0 -1
index a16428bdf54..675491234a6 100755
@@ -2,7 +2,6 @@
 
 test_description='rebase topology tests with merges'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
t/t3426-rebase-submodule.sh +0 -1
index 94ea88e384e..ba069dccbdf 100755
@@ -2,7 +2,6 @@
 
 test_description='rebase can handle submodules'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-submodule-update.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
t/t3427-rebase-subtree.sh +0 -1
index 5e9046e3df3..1b3e97c8755 100755
@@ -7,7 +7,6 @@ This test runs git rebase and tests the subtree strategy.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
t/t3428-rebase-signoff.sh +0 -1
index 365436ebfc3..6f57aed9fac 100755
@@ -5,7 +5,6 @@ test_description='git rebase --signoff
 This test runs git rebase --signoff and make sure that it works.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
t/t3429-rebase-edit-todo.sh +0 -1
index 8e0d03969a2..abd66f36021 100755
@@ -2,7 +2,6 @@
 
 test_description='rebase should reread the todo file if an exec modifies it'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
t/t3430-rebase-merges.sh +0 -1
index cb891eeb5fd..2593711fecd 100755
@@ -21,7 +21,6 @@ Initial setup:
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-rebase.sh
 . "$TEST_DIRECTORY"/lib-log-graph.sh
t/t3431-rebase-fork-point.sh +0 -1
index 7b9c135c6e2..be09fc78c16 100755
@@ -8,7 +8,6 @@ test_description='git rebase --fork-point test'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # A---B---D---E    (main)
t/t3432-rebase-fast-forward.sh +0 -1
index 7f1a5dd3deb..5086e14c022 100755
@@ -8,7 +8,6 @@ test_description='ensure rebase fast-forwards commits when possible'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3433-rebase-across-mode-change.sh +0 -1
index c8172b08522..05df964670f 100755
@@ -2,7 +2,6 @@
 
 test_description='git rebase across mode change'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3434-rebase-i18n.sh +0 -1
index 97fc9a23f21..8c94fdffc43 100755
@@ -17,7 +17,6 @@ Initial setup:
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if ! test_have_prereq ICONV
t/t3435-rebase-gpg-sign.sh +0 -1
index 6e329fea7c0..6aa2aeb628d 100755
@@ -8,7 +8,6 @@ test_description='test rebase --[no-]gpg-sign'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-rebase.sh"
 . "$TEST_DIRECTORY/lib-gpg.sh"
t/t3436-rebase-more-options.sh +0 -1
index 4d9744e5fc7..94671d3c465 100755
@@ -5,7 +5,6 @@
 
 test_description='tests to ensure compatibility between am and interactive backends'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
t/t3437-rebase-fixup-options.sh +0 -1
index 7929e2e2e3a..6f9307e0e3c 100755
@@ -14,7 +14,6 @@ to the "fixup" command that works with "fixup!", "fixup -C" works with
 "amend!" upon --autosquash.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-rebase.sh
t/t3438-rebase-broken-files.sh +0 -1
index 821f08e5afb..78d42f4c799 100755
@@ -2,7 +2,6 @@
 
 test_description='rebase behavior when on-disk files are broken'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up conflicting branches' '
t/t3500-cherry.sh +0 -1
index 61ca87512d5..78c3eac54b5 100755
@@ -11,7 +11,6 @@ checks that git cherry only returns the second patch in the local branch
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 GIT_AUTHOR_EMAIL=bogus_email_address
t/t3501-revert-cherry-pick.sh +0 -1
index 411027fb58c..17a99379625 100755
@@ -5,7 +5,6 @@ test_description='miscellaneous basic tests for cherry-pick and revert'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3502-cherry-pick-merge.sh +0 -1
index 1b2c0d6aca6..5495eacfec1 100755
@@ -11,7 +11,6 @@ test_description='cherry picking and reverting a merge
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3503-cherry-pick-root.sh +0 -1
index 76d393dc8a3..95fe4feaeee 100755
@@ -5,7 +5,6 @@ test_description='test cherry-picking (and reverting) a root commit'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3504-cherry-pick-rerere.sh +0 -1
index 109016eba92..18aeba161c0 100755
@@ -5,7 +5,6 @@ test_description='cherry-pick should rerere for conflicts'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3505-cherry-pick-empty.sh +0 -1
index ead3fb46807..9748443530c 100755
@@ -5,7 +5,6 @@ test_description='test cherry-picking an empty commit'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3506-cherry-pick-ff.sh +0 -1
index b71bad17b85..7e11bd4a4c5 100755
@@ -5,7 +5,6 @@ test_description='test cherry-picking with --ff option'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t3507-cherry-pick-conflict.sh +0 -1
index 10e9c91dbbd..f3947b400a3 100755
@@ -13,7 +13,6 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 TEST_CREATE_REPO_NO_TEMPLATE=1
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 pristine_detach () {
t/t3508-cherry-pick-many-commits.sh +0 -1
index afa7727a4af..2d53ce754c5 100755
@@ -5,7 +5,6 @@ test_description='test cherry-picking many commits'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_head_differs_from() {
t/t3509-cherry-pick-merge-df.sh +0 -1
index 171cc6d76b7..f4159246e1e 100755
@@ -4,7 +4,6 @@ test_description='Test cherry-pick with directory/file conflicts'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'Initialize repository' '
t/t3510-cherry-pick-sequence.sh +0 -1
index 93c725bac3c..7eb52b12edc 100755
@@ -12,7 +12,6 @@ test_description='Test cherry-pick continuation features
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Repeat first match 10 times
t/t3511-cherry-pick-x.sh +0 -1
index dd5d92ef302..84a587daf3a 100755
@@ -2,7 +2,6 @@
 
 test_description='Test cherry-pick -x and -s'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 pristine_detach () {
t/t3512-cherry-pick-submodule.sh +0 -1
index 9387a22a9e7..f22d1ddead1 100755
@@ -5,7 +5,6 @@ test_description='cherry-pick can handle submodules'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-submodule-update.sh
 
t/t3513-revert-submodule.sh +0 -1
index e178968b408..8bfe3ed2467 100755
@@ -2,7 +2,6 @@
 
 test_description='revert can handle submodules'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-submodule-update.sh
 
t/t3514-cherry-pick-revert-gpg.sh +0 -1
index 133dc072178..5b2e250eaa5 100755
@@ -5,7 +5,6 @@
 
 test_description='test {cherry-pick,revert} --[no-]gpg-sign'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
t/t3600-rm.sh +0 -1
index 31ac31d4bcd..98259e2adaa 100755
@@ -8,7 +8,6 @@ test_description='Test of the various options to git rm.'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Setup some files to be removed, some with funny characters
t/t3601-rm-pathspec-file.sh +0 -1
index 7cef12981c4..31bd9960fcd 100755
@@ -2,7 +2,6 @@
 
 test_description='rm --pathspec-from-file'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_tick
t/t3602-rm-sparse-checkout.sh +0 -1
index fcdefba48cc..08580fd3dcc 100755
@@ -2,7 +2,6 @@
 
 test_description='git rm in sparse checked out working trees'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' "
t/t3650-replay-basics.sh +0 -1
index 12bd3db4cb7..389670262e4 100755
@@ -5,7 +5,6 @@ test_description='basic git replay tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 GIT_AUTHOR_NAME=author@name
t/t3700-add.sh +0 -1
index 839c904745a..4c543a1a7e8 100755
@@ -5,7 +5,6 @@
 
 test_description='Test of git add, including the -- option.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-unique-files.sh
t/t3701-add-interactive.sh +0 -1
index 718438ffc7d..b8a05d95f3f 100755
@@ -4,7 +4,6 @@ test_description='add -i basic tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
t/t3702-add-edit.sh +0 -1
index 82bfb2fd2ac..8bacacbac68 100755
@@ -5,7 +5,6 @@
 
 test_description='add -e basic tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 
t/t3703-add-magic-pathspec.sh +0 -1
index d84071038e0..3ef525a559d 100755
@@ -2,7 +2,6 @@
 
 test_description='magic pathspec tests using git-add'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3704-add-pathspec-file.sh +0 -1
index 3aa59f6f639..b9c96e273fb 100755
@@ -2,7 +2,6 @@
 
 test_description='add --pathspec-from-file'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_tick
t/t3705-add-sparse-checkout.sh +0 -1
index 6ae45a788d1..2bade9e804f 100755
@@ -2,7 +2,6 @@
 
 test_description='git add in sparse checked out working trees'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 SPARSE_ENTRY_BLOB=""
t/t3800-mktag.sh +0 -1
index d3e428ff46e..e3cf0ffbe59 100755
@@ -4,7 +4,6 @@
 
 test_description='git mktag: tag object verify test'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 ###########################################################
t/t3900-i18n-commit.sh +0 -1
index 9d4b5ab1f95..3c930ec202d 100755
@@ -5,7 +5,6 @@
 
 test_description='commit and log output encodings'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if ! test_have_prereq ICONV
t/t3901-i18n-patch.sh +0 -1
index e0659c92935..f03601b49a9 100755
@@ -8,7 +8,6 @@ test_description='i18n settings and format-patch | am pipe'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if ! test_have_prereq ICONV
t/t3902-quoted.sh +0 -1
index 72a5a565e97..f528008c363 100755
@@ -5,7 +5,6 @@
 
 test_description='quoted output'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 FN='濱野'
t/t3903-stash.sh +0 -1
index c87592ee2f3..74666ff3e4b 100755
@@ -8,7 +8,6 @@ test_description='Test git stash'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-unique-files.sh
 
t/t3904-stash-patch.sh +0 -1
index aa5019fd6c3..ae313e3c705 100755
@@ -2,7 +2,6 @@
 
 test_description='stash -p'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-patch-mode.sh
 
 test_expect_success 'setup' '
t/t3905-stash-include-untracked.sh +0 -1
index a1733f45c3a..1289ae3e07c 100755
@@ -5,7 +5,6 @@
 
 test_description='Test git stash --include-untracked'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'stash save --include-untracked some dirty working directory' '
t/t3906-stash-submodule.sh +0 -1
index 0f61f01ef43..0f7348ec21b 100755
@@ -2,7 +2,6 @@
 
 test_description='stash can handle submodules'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-submodule-update.sh
 
t/t3907-stash-show-config.sh +0 -1
index 7a2eb98b864..10914bba7b3 100755
@@ -2,7 +2,6 @@
 
 test_description='Test git stash show configuration.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3908-stash-in-worktree.sh +0 -1
index 347a89b030b..2b2b366ef94 100755
@@ -5,7 +5,6 @@
 
 test_description='Test git stash in a worktree'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t3909-stash-pathspec-file.sh +0 -1
index 83269d0eb4c..73f2dbdeb02 100755
@@ -2,7 +2,6 @@
 
 test_description='stash --pathspec-from-file'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_tick
t/t3920-crlf-messages.sh +0 -1
index 31877f00c77..e2e1251a057 100755
@@ -2,7 +2,6 @@
 
 test_description='Test ref-filter and pretty APIs for commit and tag messages using CRLF'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 LIB_CRLF_BRANCHES=""
t/t4000-diff-format.sh +0 -1
index 8d50331b8c8..a51f881b1c9 100755
@@ -10,7 +10,6 @@ same command line parser, so testing one should be sufficient; pick
 diff-files as a representative.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4001-diff-rename.sh +0 -1
index cd1931dd555..4f520d600de 100755
@@ -5,7 +5,6 @@
 
 test_description='Test rename detection in diff engine.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4002-diff-basic.sh +0 -1
index cb3307010c1..e44648e6f3d 100755
@@ -7,7 +7,6 @@ test_description='Test diff raw-output.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh
t/t4003-diff-rename-1.sh +0 -1
index ebe091828c8..fd4faee5d25 100755
@@ -7,7 +7,6 @@ test_description='More rename detection
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
t/t4004-diff-rename-symlink.sh +0 -1
index 1d70d4d221b..faf3465deb4 100755
@@ -10,7 +10,6 @@ copy of symbolic links, but should not produce rename/copy followed
 by an edit for them.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4005-diff-rename-2.sh +0 -1
index 5c756dc2435..92d1141fbe0 100755
@@ -6,7 +6,6 @@
 test_description='Same rename detection as t4003 but testing diff-raw.'
 
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
t/t4006-diff-mode.sh +0 -1
index dbd4c0da213..2299b91fc4b 100755
@@ -7,7 +7,6 @@ test_description='Test mode change diffs.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 sed_script='s/\(:100644 100755\) \('"$OID_REGEX"'\) \2 /\1 X X /'
t/t4007-rename-3.sh +0 -1
index b86165cbac5..e8faf0dd2ef 100755
@@ -7,7 +7,6 @@ test_description='Rename interaction with pathspec.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
t/t4008-diff-break-rewrite.sh +0 -1
index b0ef0026e08..c187c52dab2 100755
@@ -22,7 +22,6 @@ With -B, this should be detected as two complete rewrites.
 Further, with -B and -M together, these should turn into two renames.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
t/t4009-diff-rename-4.sh +0 -1
index 3480781dabf..59e71e3acde 100755
@@ -7,7 +7,6 @@ test_description='Same rename detection as t4003 but testing diff-raw -z.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
t/t4010-diff-pathspec.sh +0 -1
index 9d9650eba7e..c84c3fa05b2 100755
@@ -10,7 +10,6 @@ Prepare:
         path1/file1
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
t/t4011-diff-symlink.sh +0 -1
index bc8ba887191..ac837b6c9ec 100755
@@ -7,7 +7,6 @@ test_description='Test diff of symlinks.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4012-diff-binary.sh +0 -1
index c64d9d2f405..d1d30ac2a94 100755
@@ -6,7 +6,6 @@
 test_description='Binary diff and apply
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >expect.binary-numstat <<\EOF
t/t4013-diff-various.sh +0 -1
index 87d248d0347..3855d68dbc0 100755
@@ -8,7 +8,6 @@ test_description='Various diff formatting options'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4014-format-patch.sh +0 -1
index 1c46e963e43..884f83fb8a4 100755
@@ -8,7 +8,6 @@ test_description='various format-patch tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
t/t4015-diff-whitespace.sh +0 -1
index 851cfe4f32c..52e3e476ffa 100755
@@ -7,7 +7,6 @@ test_description='Test special whitespace in diff engine.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4016-diff-quote.sh +0 -1
index 5a8d8876831..876271d6826 100755
@@ -6,7 +6,6 @@
 test_description='Quoting paths in diff output.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 P0='pathname'
t/t4017-diff-retval.sh +0 -1
index 1cea73ef5a3..c2863c99b71 100755
@@ -5,7 +5,6 @@ test_description='Return value of diffs'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4018-diff-funcname.sh +0 -1
index 8128c30e7f2..e026fac1f40 100755
@@ -5,7 +5,6 @@
 
 test_description='Test custom diff function name patterns'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4019-diff-wserror.sh +0 -1
index d2b3109c2d3..4001dacee39 100755
@@ -2,7 +2,6 @@
 
 test_description='diff whitespace error detection'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t4020-diff-external.sh +0 -1
index 0e5a05894fd..f1efe482a59 100755
@@ -2,7 +2,6 @@
 
 test_description='external diff interface test'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t4021-format-patch-numbered.sh +0 -1
index 1219aa226dc..9be65fd4440 100755
@@ -5,7 +5,6 @@
 
 test_description='Format-patch numbering options'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t4022-diff-rewrite.sh +0 -1
index 77bc36d5d8f..6fed993ea0b 100755
@@ -2,7 +2,6 @@
 
 test_description='rewrite diff'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff-data.sh
 
t/t4023-diff-rename-typechange.sh +0 -1
index e6f4fe441e1..787605ce3fd 100755
@@ -2,7 +2,6 @@
 
 test_description='typechange rename detection'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4024-diff-optimize-common.sh +0 -1
index e2f0eca4af0..b98ac0a0c03 100755
@@ -2,7 +2,6 @@
 
 test_description='common tail optimization'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 z=zzzzzzzz ;# 8
t/t4025-hunk-header.sh +0 -1
index 5397cb7d42d..c39bb07a417 100755
@@ -2,7 +2,6 @@
 
 test_description='diff hunk header truncation'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 N='日本語'
t/t4026-color.sh +0 -1
index b05f2a9b607..08f6805e1c8 100755
@@ -5,7 +5,6 @@
 
 test_description='Test diff/status color escape codes'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 ESC=$(printf '\033')
t/t4027-diff-submodule.sh +0 -1
index 40164ae07d2..295da987cce 100755
@@ -2,7 +2,6 @@
 
 test_description='difference in submodules'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4028-format-patch-mime-headers.sh +0 -1
index 60cb819c42e..a06a7479260 100755
@@ -2,7 +2,6 @@
 
 test_description='format-patch mime headers and extra headers do not conflict'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create commit with utf-8 body' '
t/t4029-diff-trailing-space.sh +0 -1
index 5f8ffef74b6..32b6e9a4e76 100755
@@ -4,7 +4,6 @@
 #
 test_description='diff honors config option, diff.suppressBlankEmpty'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat <<\EOF >expected ||
t/t4030-diff-textconv.sh +0 -1
index 29f6d610c2e..daebf9796f5 100755
@@ -2,7 +2,6 @@
 
 test_description='diff.*.textconv tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 find_diff() {
t/t4031-diff-rewrite-binary.sh +0 -1
index 1b8cd3e4c97..c4394a27b56 100755
@@ -2,7 +2,6 @@
 
 test_description='rewrite diff on binary file'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # We must be large enough to meet the MINIMUM_BREAK_SIZE
t/t4032-diff-inter-hunk-context.sh +0 -1
index 7db92d0d9f4..bada0cbd32f 100755
@@ -2,7 +2,6 @@
 
 test_description='diff hunk fusing'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 f() {
t/t4033-diff-patience.sh +0 -1
index f7be7f5ef01..113304dc596 100755
@@ -2,7 +2,6 @@
 
 test_description='patience diff algorithm'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff-alternative.sh
 
t/t4034-diff-words.sh +0 -1
index 4dcd7e99250..f51d3557f10 100755
@@ -2,7 +2,6 @@
 
 test_description='word diff colors'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4035-diff-quiet.sh +0 -1
index 76f8034c60f..0352bf81a90 100755
@@ -2,7 +2,6 @@
 
 test_description='Return value of diffs'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4036-format-patch-signer-mime.sh +0 -1
index 48655bcc789..98d9713d8b2 100755
@@ -2,7 +2,6 @@
 
 test_description='format-patch -s should force MIME encoding as needed'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t4037-diff-r-t-dirs.sh +0 -1
index b5f96fe23bd..f5ce3b29a2a 100755
@@ -2,7 +2,6 @@
 
 test_description='diff -r -t shows directory additions and deletions'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t4038-diff-combined.sh +0 -1
index 00190802d83..2ce26e585c9 100755
@@ -5,7 +5,6 @@ test_description='combined diff'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4039-diff-assume-unchanged.sh +0 -1
index 78090e6852d..0eb0314a8b3 100755
@@ -2,7 +2,6 @@
 
 test_description='diff with assume-unchanged entries'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # external diff has been tested in t4020-diff-external.sh
t/t4040-whitespace-status.sh +0 -1
index eec3d73dc2b..1b27a0e3813 100755
@@ -2,7 +2,6 @@
 
 test_description='diff --exit-code with whitespace'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t4041-diff-submodule-option.sh +0 -1
index aa149e0085e..28f9d83d4c1 100755
@@ -12,7 +12,6 @@ This test tries to verify the sanity of the --submodule option of git diff.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Test non-UTF-8 encoding in case iconv is available.
t/t4042-diff-textconv-caching.sh +0 -1
index a179205394d..ff0e73531b9 100755
@@ -2,7 +2,6 @@
 
 test_description='test textconv caching'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >helper <<'EOF'
t/t4043-diff-rename-binary.sh +0 -1
index e4864939081..2a2cf913520 100755
@@ -5,7 +5,6 @@
 
 test_description='Move a binary file'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 
t/t4044-diff-index-unique-abbrev.sh +0 -1
index 9f6043dabac..8400bfbd3c7 100755
@@ -2,7 +2,6 @@
 
 test_description='test unique sha1 abbreviation on "index from..to" line'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4045-diff-relative.sh +0 -1
index 9b46c4c1bef..2c8493fe66c 100755
@@ -2,7 +2,6 @@
 
 test_description='diff --relative tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4046-diff-unmerged.sh +0 -1
index afda629c981..7c27f053663 100755
@@ -2,7 +2,6 @@
 
 test_description='diff with unmerged index entries'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t4047-diff-dirstat.sh +0 -1
index 7b73462d53d..a7ce8d3161b 100755
@@ -2,7 +2,6 @@
 
 test_description='diff --dirstat tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # set up two commits where the second commit has these files
t/t4048-diff-combined-binary.sh +0 -1
index f399484bcef..0260cf64f5d 100755
@@ -4,7 +4,6 @@ test_description='combined and merge diff handle binary files and textconv'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup binary merge conflict' '
t/t4049-diff-stat-count.sh +0 -1
index 0a4fc735d44..eceb47c8594 100755
@@ -3,7 +3,6 @@
 
 test_description='diff --stat-count'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4050-diff-histogram.sh +0 -1
index c61b30f96da..fd3e86a74f3 100755
@@ -2,7 +2,6 @@
 
 test_description='histogram diff algorithm'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff-alternative.sh
 
t/t4051-diff-function-context.sh +0 -1
index 725278ad19c..4838a1df8b4 100755
@@ -2,7 +2,6 @@
 
 test_description='diff function context'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 dir="$TEST_DIRECTORY/t4051"
t/t4052-stat-output.sh +0 -1
index 7badd72488d..740bb970918 100755
@@ -8,7 +8,6 @@ test_description='test --stat output of various commands'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
t/t4053-diff-no-index.sh +0 -1
index 651ec776606..5e5bad61ca1 100755
@@ -2,7 +2,6 @@
 
 test_description='diff --no-index'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4054-diff-bogus-tree.sh +0 -1
index 05c88f8cdf0..1131431fe0e 100755
@@ -2,7 +2,6 @@
 
 test_description='test diff with a bogus tree containing the null sha1'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create bogus tree' '
t/t4055-diff-context.sh +0 -1
index 3ea9ae99e04..f7ff234cf93 100755
@@ -5,7 +5,6 @@
 
 test_description='diff.context configuration'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4056-diff-order.sh +0 -1
index 32c5fcb9a27..aec1d9d1b42 100755
@@ -5,7 +5,6 @@ test_description='diff order & rotate'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 create_files () {
t/t4057-diff-combined-paths.sh +0 -1
index 9a7505cbb8b..04b8a1542a8 100755
@@ -5,7 +5,6 @@ test_description='combined diff show only paths that are different to all parent
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # verify that diffc.expect matches output of
t/t4058-diff-duplicates.sh +0 -1
index 18e5ac88c31..2fce4a98977 100755
@@ -11,7 +11,6 @@
 
 test_description='test tree diff when trees have duplicate entries'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # make_tree_entry <mode> <mode> <sha1>
t/t4059-diff-submodule-not-initialized.sh +0 -1
index 28fd3cdb154..0fe81056d5b 100755
@@ -9,7 +9,6 @@ This test tries to verify that add_submodule_odb works when the submodule was
 initialized previously but the checkout has since been removed.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 
t/t4060-diff-submodule-option-diff-format.sh +0 -1
index 918334fa4c8..76b83101d3b 100755
@@ -10,7 +10,6 @@ test_description='Support for diff format verbose submodule difference in git di
 This test tries to verify the sanity of --submodule=diff option of git diff.
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Test non-UTF-8 encoding in case iconv is available.
t/t4061-diff-indent.sh +0 -1
index 2942e5d9b93..7750b87ca16 100755
@@ -6,7 +6,6 @@ test_description='Test diff indent heuristic.
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
t/t4062-diff-pickaxe.sh +0 -1
index a90b46b678c..8ad3d799579 100755
@@ -5,7 +5,6 @@
 
 test_description='Pickaxe options'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t4063-diff-blobs.sh +0 -1
index 7e6c9d63843..50fdb5ea529 100755
@@ -2,7 +2,6 @@
 
 test_description='test direct comparison of blobs via git-diff'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 run_diff () {
t/t4064-diff-oidfind.sh +0 -1
index 846f285f772..e86bba679e5 100755
@@ -2,7 +2,6 @@
 
 test_description='test finding specific blobs in the revision walking'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup ' '
t/t4065-diff-anchored.sh +0 -1
index 647537c12ea..b3f510f040e 100755
@@ -2,7 +2,6 @@
 
 test_description='anchored diff algorithm'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success '--anchored' '
t/t4066-diff-emit-delay.sh +0 -1
index 0ecb3915412..a1de63b77f8 100755
@@ -4,7 +4,6 @@ test_description='test combined/stat/moved interaction'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # This test covers a weird 3-way interaction between "--cc -p", which will run
t/t4067-diff-partial-clone.sh +0 -1
index 7af3a08862d..581250dd2d2 100755
@@ -2,7 +2,6 @@
 
 test_description='behavior of diff when reading objects in a partial clone'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'git show batches blobs' '
t/t4068-diff-symmetric-merge-base.sh +0 -1
index 4d6565e728b..eff63c16b06 100755
@@ -5,7 +5,6 @@ test_description='behavior of diff with symmetric-diff setups and --merge-base'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # build these situations:
t/t4069-remerge-diff.sh +0 -1
index df342850a0d..ca8f999caba 100755
@@ -2,7 +2,6 @@
 
 test_description='remerge-diff handling'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # This test is ort-specific
t/t4100-apply-stat.sh +0 -1
index d503547732c..146e73d8f55 100755
@@ -7,7 +7,6 @@ test_description='git apply --stat --summary test, with --recount
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 UNC='s/^\(@@ -[1-9][0-9]*\),[0-9]* \(+[1-9][0-9]*\),[0-9]* @@/\1,999 \2,999 @@/'
t/t4101-apply-nonl.sh +0 -1
index b1169193ef5..4df74baa249 100755
@@ -7,7 +7,6 @@ test_description='git apply should handle files with incomplete lines.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # setup
t/t4102-apply-rename.sh +0 -1
index d1e06fc1ac4..e42a31c9179 100755
@@ -7,7 +7,6 @@ test_description='git apply handling copy/rename patch.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # setup
t/t4103-apply-binary.sh +0 -1
index 144619ab873..d370ecfe0d9 100755
@@ -9,7 +9,6 @@ test_description='git apply handling binary patches
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4104-apply-boundary.sh +0 -1
index dc501aac387..71ef4132d15 100755
@@ -5,7 +5,6 @@
 
 test_description='git apply boundary tests'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 L="c d e f g h i j k l m n o p q r s t u v w x"
t/t4105-apply-fuzz.sh +0 -1
index ed814a839e6..b59785166d4 100755
@@ -3,7 +3,6 @@
 test_description='apply with fuzz and offset'
 
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 dotest () {
t/t4106-apply-stdin.sh +0 -1
index 5c150f3b0b2..aa2fff7afa7 100755
@@ -3,7 +3,6 @@
 test_description='git apply --numstat - <patch'
 
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
t/t4107-apply-ignore-whitespace.sh +0 -1
index 5e6e203aa52..94ba6dd4e00 100755
@@ -5,7 +5,6 @@
 
 test_description='git-apply --ignore-whitespace.'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # This primes main.c file that indents without using HT at all.
t/t4108-apply-threeway.sh +0 -1
index c6302163d84..f30e85659db 100755
@@ -5,7 +5,6 @@ test_description='git apply --3way'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 print_sanitized_conflicted_diff () {
t/t4109-apply-multifrag.sh +0 -1
index 4dc6d8e7d3c..ac523a5d562 100755
@@ -7,7 +7,6 @@
 test_description='git apply test patches with multiple fragments.'
 
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cp "$TEST_DIRECTORY/t4109/patch1.patch" .
t/t4110-apply-scan.sh +0 -1
index 266302a1829..cc17ff2ab9a 100755
@@ -8,7 +8,6 @@ test_description='git apply test for patches which require scanning forwards and
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'git apply scan' '
t/t4111-apply-subdir.sh +0 -1
index e9a87d761d1..1618a6dbc7c 100755
@@ -2,7 +2,6 @@
 
 test_description='patching from inconvenient places'
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
t/t4112-apply-renames.sh +0 -1
index d53aa4222ea..bb5d529bec1 100755
@@ -8,7 +8,6 @@ test_description='git apply should not get confused with rename/copy.
 '
 
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # setup
t/t4113-apply-ending.sh +0 -1
index 2c65c6a1696..66fa51591eb 100755
@@ -6,7 +6,6 @@
 test_description='git apply trying to add an ending line.
 
 '
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # setup
t/t4114-apply-typechange.sh +0 -1
index 8ff36407667..da3e64f8110 100755
@@ -7,7 +7,6 @@ test_description='git apply should not get confused with type changes.
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup repository and commits' '
t/t4115-apply-symlink.sh +0 -1
index cbef0a593fb..769b0e4f9df 100755
@@ -7,7 +7,6 @@ test_description='git apply symlinks and partial files
 
 '
 
-TEST_PASSES_SANITIZE_LEAK=true
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

t/t4116-apply-reverse.sh +0 -1
index a9f4ddda6c3..0784ba033a4 100755

Lines of this file are not shown. View the raw message.

t/t4117-apply-reject.sh +0 -1
index 4d15ccd28ec..c86d05a96fe 100755

Lines of this file are not shown. View the raw message.

t/t4118-apply-empty-context.sh +0 -1
index 69c9c48e72b..c1dcbd7d356 100755

Lines of this file are not shown. View the raw message.

t/t4119-apply-config.sh +0 -1
index 208c961d376..f3b43e22162 100755

Lines of this file are not shown. View the raw message.

t/t4120-apply-popt.sh +0 -1
index f7884285400..697e86c0ff4 100755

Lines of this file are not shown. View the raw message.

t/t4121-apply-diffs.sh +0 -1
index a80cec9d119..b45454aaf4b 100755

Lines of this file are not shown. View the raw message.

t/t4122-apply-symlink-inside.sh +0 -1
index 2089d84f645..3340ab4370c 100755

Lines of this file are not shown. View the raw message.

t/t4123-apply-shrink.sh +0 -1
index 3601c0c5dca..3ef84619f53 100755

Lines of this file are not shown. View the raw message.

t/t4124-apply-ws-rule.sh +0 -1
index cdffee0273c..485c7d2d124 100755

Lines of this file are not shown. View the raw message.

t/t4125-apply-ws-fuzz.sh +0 -1
index f248cc2a008..090987c89b2 100755

Lines of this file are not shown. View the raw message.

t/t4126-apply-empty.sh +0 -1
index 56210b56099..eff783f8d68 100755

Lines of this file are not shown. View the raw message.

t/t4127-apply-same-fn.sh +0 -1
index aa5cfae2b68..bd516c4aad7 100755

Lines of this file are not shown. View the raw message.

t/t4128-apply-root.sh +0 -1
index ed94c90204e..f6db5a79dd9 100755

Lines of this file are not shown. View the raw message.

t/t4129-apply-samemode.sh +0 -1
index 87ffd2b8e1a..2149ad5da44 100755

Lines of this file are not shown. View the raw message.

t/t4130-apply-criss-cross-rename.sh +0 -1
index f3ea6327425..211ef1c7e78 100755

Lines of this file are not shown. View the raw message.

t/t4131-apply-fake-ancestor.sh +0 -1
index 40c92115a66..b1361ce5469 100755

Lines of this file are not shown. View the raw message.

t/t4132-apply-removal.sh +0 -1
index c1e3049c041..ab1628d27d0 100755

Lines of this file are not shown. View the raw message.

t/t4133-apply-filenames.sh +0 -1
index c21ddb29466..3cab1038cf5 100755

Lines of this file are not shown. View the raw message.

t/t4134-apply-submodule.sh +0 -1
index aceb4c42b0f..8cea75cf7bc 100755

Lines of this file are not shown. View the raw message.

t/t4135-apply-weird-filenames.sh +0 -1
index d3502c6fddf..6bc3fb97a75 100755

Lines of this file are not shown. View the raw message.

t/t4136-apply-check.sh +0 -1
index dfec1c5f0f6..82f2f2e4753 100755

Lines of this file are not shown. View the raw message.

t/t4137-apply-submodule.sh +0 -1
index ebd0d4ad17c..07d52625375 100755

Lines of this file are not shown. View the raw message.

t/t4138-apply-ws-expansion.sh +0 -1
index 7981931b4ed..8bbf8260fa6 100755

Lines of this file are not shown. View the raw message.

t/t4139-apply-escape.sh +0 -1
index e5c7439df13..e07fb9ef089 100755

Lines of this file are not shown. View the raw message.

t/t4140-apply-ita.sh +0 -1
index b375aca0d74..c614eaf04cc 100755

Lines of this file are not shown. View the raw message.

t/t4141-apply-too-large.sh +0 -1
index 20cc1209f62..eac6f7e151b 100755

Lines of this file are not shown. View the raw message.

t/t4150-am.sh +0 -1
index 232e1394e8d..5e2b6c80eae 100755

Lines of this file are not shown. View the raw message.

t/t4151-am-abort.sh +0 -1
index 1825a89d6a9..edb38da7010 100755

Lines of this file are not shown. View the raw message.

t/t4152-am-subjects.sh +0 -1
index 9f2edba1f83..768495b1315 100755

Lines of this file are not shown. View the raw message.

t/t4153-am-resume-override-opts.sh +0 -1
index dd6ad8f7a80..9bec989a0ed 100755

Lines of this file are not shown. View the raw message.

t/t4200-rerere.sh +0 -1
index 213b36fb962..b0a3e849841 100755

Lines of this file are not shown. View the raw message.

t/t4201-shortlog.sh +0 -1
index 7f47f85c7f3..5f23fc147bb 100755

Lines of this file are not shown. View the raw message.

t/t4202-log.sh +0 -1
index 35bec4089a3..51f7beb59f8 100755

Lines of this file are not shown. View the raw message.

t/t4203-mailmap.sh +0 -1
index 2265ff8872d..24214919312 100755

Lines of this file are not shown. View the raw message.

t/t4204-patch-id.sh +0 -1
index 8e0f283c2b8..605faea0c7b 100755

Lines of this file are not shown. View the raw message.

t/t4205-log-pretty-formats.sh +0 -1
index f9a9c2145ed..f81e42a84d5 100755

Lines of this file are not shown. View the raw message.

t/t4206-log-follow-harder-copies.sh +0 -1
index 9167b0351f2..bcab71c8e84 100755

Lines of this file are not shown. View the raw message.

t/t4207-log-decoration-colors.sh +0 -1
index 73ea9e51550..0614511656f 100755

Lines of this file are not shown. View the raw message.

t/t4208-log-magic-pathspec.sh +0 -1
index 2a46eb6bedb..806b2809d40 100755

Lines of this file are not shown. View the raw message.

t/t4209-log-pickaxe.sh +0 -1
index b42fdc54fcb..a675ace0819 100755

Lines of this file are not shown. View the raw message.

t/t4210-log-i18n.sh +0 -1
index 4a12b2b4979..26dda0db384 100755

Lines of this file are not shown. View the raw message.

t/t4211-line-log.sh +0 -1
index 1d6dd982a2a..950451cf6a6 100755

Lines of this file are not shown. View the raw message.

t/t4212-log-corrupt.sh +0 -1
index e6b59123a37..64d818bc70a 100755

Lines of this file are not shown. View the raw message.

t/t4213-log-tabexpand.sh +0 -1
index 590fce95e90..53a4af32449 100755

Lines of this file are not shown. View the raw message.

t/t4214-log-graph-octopus.sh +0 -1
index 79055978690..f70c46bbbfa 100755

Lines of this file are not shown. View the raw message.

t/t4215-log-skewed-merges.sh +0 -1
index b877ac72351..28d0779a8c5 100755

Lines of this file are not shown. View the raw message.

t/t4216-log-bloom.sh +0 -1
index 8d22338f6aa..3f163dc3969 100755

Lines of this file are not shown. View the raw message.

t/t4217-log-limit.sh +0 -1
index 613f0710e90..6e01e2629c1 100755

Lines of this file are not shown. View the raw message.

t/t4252-am-options.sh +0 -1
index 5b680dc7559..bda8822b3d1 100755

Lines of this file are not shown. View the raw message.

t/t4253-am-keep-cr-dos.sh +0 -1
index 2bcdd9f34fa..0ee69d2a0c4 100755

Lines of this file are not shown. View the raw message.

t/t4254-am-corrupt.sh +0 -1
index cb03522d021..ae0a56cf5ec 100755

Lines of this file are not shown. View the raw message.

t/t4255-am-submodule.sh +0 -1
index 04f3ccfc41c..a7ba08f728c 100755

Lines of this file are not shown. View the raw message.

t/t4256-am-format-flowed.sh +0 -1
index 92d8c8b651c..ac9db285f3f 100755

Lines of this file are not shown. View the raw message.

t/t4257-am-interactive.sh +0 -1
index f26d7fd2dbd..30a565cbeaf 100755

Lines of this file are not shown. View the raw message.

t/t4258-am-quoted-cr.sh +0 -1
index 3573c9147f1..201915b45a8 100755

Lines of this file are not shown. View the raw message.

t/t4300-merge-tree.sh +0 -1
index 9c197260d5b..27fbe193bca 100755

Lines of this file are not shown. View the raw message.

t/t4301-merge-tree-write-tree.sh +0 -1
index 37f1cd7364c..eea19907b55 100755

Lines of this file are not shown. View the raw message.

t/t5000-tar-tree.sh +0 -1
index b9fda973f7b..5465054f177 100755

Lines of this file are not shown. View the raw message.

t/t5001-archive-attr.sh +0 -1
index 7310774af5e..e7450764411 100755

Lines of this file are not shown. View the raw message.

t/t5002-archive-attr-pattern.sh +0 -1
index 78ab75f1bc2..97c93f6c442 100755

Lines of this file are not shown. View the raw message.

t/t5003-archive-zip.sh +0 -1
index 01f591c99b9..961c6aac256 100755

Lines of this file are not shown. View the raw message.

t/t5004-archive-corner-cases.sh +0 -1
index 9f2c6da80e8..50344e17ca1 100755

Lines of this file are not shown. View the raw message.

t/t5100-mailinfo.sh +0 -1
index 23b2f218725..e57e1ae7395 100755

Lines of this file are not shown. View the raw message.

t/t5150-request-pull.sh +0 -1
index 86bee331607..cb67bac1c47 100755

Lines of this file are not shown. View the raw message.

t/t5200-update-server-info.sh +0 -1
index cc51c73986c..83659070559 100755

Lines of this file are not shown. View the raw message.

t/t5300-pack-object.sh +0 -1
index 3b9dae331a5..e13f289dd59 100755

Lines of this file are not shown. View the raw message.

t/t5301-sliding-window.sh +0 -1
index 226490d60df..ff6b5159a31 100755

Lines of this file are not shown. View the raw message.

t/t5302-pack-index.sh +0 -1
index d88e6f16910..413c99274c8 100755

Lines of this file are not shown. View the raw message.

t/t5303-pack-corruption-resilience.sh +0 -1
index b634bfb6651..de58ca654a1 100755

Lines of this file are not shown. View the raw message.

t/t5304-prune.sh +0 -1
index e641df0116c..1f1f664871e 100755

Lines of this file are not shown. View the raw message.

t/t5305-include-tag.sh +0 -1
index dc8fe55c82d..44bd9ef45fd 100755

Lines of this file are not shown. View the raw message.

t/t5306-pack-nobase.sh +0 -1
index 0d50c6b4bca..805d60ff317 100755

Lines of this file are not shown. View the raw message.

t/t5307-pack-missing-commit.sh +0 -1
index 1e02c305c4f..fa4bc269fe8 100755

Lines of this file are not shown. View the raw message.

t/t5308-pack-detect-duplicates.sh +0 -1
index 655cafa0541..0f841378677 100755

Lines of this file are not shown. View the raw message.

t/t5309-pack-delta-cycles.sh +0 -1
index 4e910c5b9d2..60fc710bacb 100755

Lines of this file are not shown. View the raw message.

t/t5310-pack-bitmaps.sh +0 -1
index 7044c7d7c6d..a6de7c57643 100755

Lines of this file are not shown. View the raw message.

t/t5311-pack-bitmaps-shallow.sh +0 -1
index 4fe71fe8cd2..012852c156a 100755

Lines of this file are not shown. View the raw message.

t/t5312-prune-corruption.sh +0 -1
index d8d2e304687..c37ef3818d2 100755

Lines of this file are not shown. View the raw message.

t/t5313-pack-bounds-checks.sh +0 -1
index 86fc73f9fba..5be01260d77 100755

Lines of this file are not shown. View the raw message.

t/t5314-pack-cycle-detection.sh +0 -1
index 82734b9a3c4..9cd18c1e6be 100755

Lines of this file are not shown. View the raw message.

t/t5315-pack-objects-compression.sh +0 -1
index c80ea9e8b71..8bacd96275b 100755

Lines of this file are not shown. View the raw message.

t/t5316-pack-delta-depth.sh +0 -1
index eb4ef3dda4d..32cf4227451 100755

Lines of this file are not shown. View the raw message.

t/t5317-pack-objects-filter-objects.sh +0 -1
index 79552d6ef7f..501d715b9a1 100755

Lines of this file are not shown. View the raw message.

t/t5318-commit-graph.sh +0 -1
index 2916c07e3c2..f68f64cd85e 100755

Lines of this file are not shown. View the raw message.

t/t5319-multi-pack-index.sh +0 -1
index fbbc218d04a..0f215ad2e88 100755

Lines of this file are not shown. View the raw message.

t/t5320-delta-islands.sh +0 -1
index 406363381f1..2c961c70963 100755

Lines of this file are not shown. View the raw message.

t/t5321-pack-large-objects.sh +0 -1
index 70770fe274d..51aaca1fcf6 100755

Lines of this file are not shown. View the raw message.

t/t5322-pack-objects-sparse.sh +0 -1
index 770695c9278..d39958c066d 100755

Lines of this file are not shown. View the raw message.

t/t5323-pack-redundant.sh +0 -1
index 4e18f5490a8..8dbbcc5e51c 100755

Lines of this file are not shown. View the raw message.

t/t5324-split-commit-graph.sh +0 -1
index 1193726daad..a32be3867df 100755

Lines of this file are not shown. View the raw message.

t/t5325-reverse-index.sh +0 -1
index 431a603ca0e..285c8b4a495 100755

Lines of this file are not shown. View the raw message.

t/t5326-multi-pack-bitmaps.sh +0 -1
index 6eaa692f33b..d27557b9b04 100755

Lines of this file are not shown. View the raw message.

t/t5327-multi-pack-bitmaps-rev.sh +0 -1
index 994a8e6be46..9cac03a94bf 100755

Lines of this file are not shown. View the raw message.

t/t5328-commit-graph-64bit-time.sh +0 -1
index fc6a242b56d..a766a3e3f84 100755

Lines of this file are not shown. View the raw message.

t/t5329-pack-objects-cruft.sh +0 -1
index 54a4a49997c..b71a0aef408 100755

Lines of this file are not shown. View the raw message.

t/t5330-no-lazy-fetch-with-commit-graph.sh +0 -1
index 5eb28f0512d..2cc7fd7a476 100755

Lines of this file are not shown. View the raw message.

t/t5331-pack-objects-stdin.sh +0 -1
index 2dcf1eeceeb..b48c0cbe8fc 100755

Lines of this file are not shown. View the raw message.

t/t5332-multi-pack-reuse.sh +0 -1
index 955ea42769b..a1b547b90c1 100755

Lines of this file are not shown. View the raw message.

t/t5333-pseudo-merge-bitmaps.sh +0 -1
index eca4a1eb8c6..1dd62847560 100755

Lines of this file are not shown. View the raw message.

t/t5334-incremental-multi-pack-index.sh +0 -1
index 471994c4bc8..26257e5660e 100755

Lines of this file are not shown. View the raw message.

t/t5351-unpack-large-objects.sh +0 -1
index 43cbcd5d497..d76eb4be932 100755

Lines of this file are not shown. View the raw message.

t/t5400-send-pack.sh +0 -1
index 248c74d8ef2..3f81f16e133 100755

Lines of this file are not shown. View the raw message.

t/t5401-update-hooks.sh +0 -1
index 3c1ea6086e7..723d1e17ec6 100755

Lines of this file are not shown. View the raw message.

t/t5402-post-merge-hook.sh +0 -1
index 46ebdfbeeba..915af2de95e 100755

Lines of this file are not shown. View the raw message.

t/t5403-post-checkout-hook.sh +0 -1
index cfaae547398..978f240cdac 100755

Lines of this file are not shown. View the raw message.

t/t5404-tracking-branches.sh +0 -1
index 51737eeafee..cc078896673 100755

Lines of this file are not shown. View the raw message.

t/t5405-send-pack-rewind.sh +0 -1
index 1686ac13aa6..11f03239a06 100755

Lines of this file are not shown. View the raw message.

t/t5406-remote-rejects.sh +0 -1
index d6a99466338..dcbeb420827 100755

Lines of this file are not shown. View the raw message.

t/t5407-post-rewrite-hook.sh +0 -1
index e99e728236a..ad7f8c6f002 100755

Lines of this file are not shown. View the raw message.

t/t5408-send-pack-stdin.sh +0 -1
index c3695a4d4e3..526a6750459 100755

Lines of this file are not shown. View the raw message.

t/t5409-colorize-remote-messages.sh +0 -1
index 516b22fd963..fa5de4500a4 100755

Lines of this file are not shown. View the raw message.

t/t5410-receive-pack-alternates.sh +0 -1
index 7a45d4c311e..0b28e4e452f 100755

Lines of this file are not shown. View the raw message.

t/t5411-proc-receive-hook.sh +0 -1
index 13d2d310a9f..92cf52c6d4a 100755

Lines of this file are not shown. View the raw message.

t/t5500-fetch-pack.sh +0 -1
index 8da8e7fe423..509133c1f91 100755

Lines of this file are not shown. View the raw message.

t/t5501-fetch-push-alternates.sh +0 -1
index 0c8668a1b8e..66f19a4ef2b 100755

Lines of this file are not shown. View the raw message.

t/t5502-quickfetch.sh +0 -1
index 7b3ff21b984..b160f8b7fb7 100755

Lines of this file are not shown. View the raw message.

t/t5503-tagfollow.sh +0 -1
index 5ebbaa48968..195fc64dd44 100755

Lines of this file are not shown. View the raw message.

t/t5504-fetch-receive-strict.sh +0 -1
index 138e6778a47..53dbc8ce3a6 100755

Lines of this file are not shown. View the raw message.

t/t5505-remote.sh +0 -1
index 532035933f3..08424e878e1 100755

Lines of this file are not shown. View the raw message.

t/t5506-remote-groups.sh +0 -1
index 0e176175a35..16e9a1bc2f2 100755

Lines of this file are not shown. View the raw message.

t/t5507-remote-environment.sh +0 -1
index c6a6957c500..a41d5b370b8 100755

Lines of this file are not shown. View the raw message.

t/t5509-fetch-push-namespaces.sh +0 -1
index f029ae0d286..095df1a7535 100755

Lines of this file are not shown. View the raw message.

t/t5510-fetch.sh +0 -1
index 0890b9f61c5..3b3991ab867 100755

Lines of this file are not shown. View the raw message.

t/t5511-refspec.sh +0 -1
index fc55681a3f2..be025b90f98 100755

Lines of this file are not shown. View the raw message.

t/t5512-ls-remote.sh +0 -1
index 64b3491e4ee..3a67992a7dc 100755

Lines of this file are not shown. View the raw message.

t/t5513-fetch-track.sh +0 -1
index c46c4dbaefc..65d1e05bd62 100755

Lines of this file are not shown. View the raw message.

t/t5514-fetch-multiple.sh +0 -1
index 579872c258d..25772c85c5a 100755

Lines of this file are not shown. View the raw message.

t/t5515-fetch-merge-logic.sh +0 -1
index c100a809c5e..320d26796d2 100755

Lines of this file are not shown. View the raw message.

t/t5516-fetch-push.sh +0 -1
index 331778bd42c..9d693eb57f7 100755

Lines of this file are not shown. View the raw message.

t/t5517-push-mirror.sh +0 -1
index 6d4944a7282..a448e169bd0 100755

Lines of this file are not shown. View the raw message.

t/t5518-fetch-exit-status.sh +0 -1
index c13120088fa..5c4ac2556e7 100755

Lines of this file are not shown. View the raw message.

t/t5519-push-alternates.sh +0 -1
index 72e97b15fab..20ba604dfde 100755

Lines of this file are not shown. View the raw message.

t/t5520-pull.sh +0 -1
index 1098cbd0a19..47534f1062d 100755

Lines of this file are not shown. View the raw message.

t/t5521-pull-options.sh +0 -1
index db00c4336b1..5e420c208c7 100755

Lines of this file are not shown. View the raw message.

t/t5522-pull-symlink.sh +0 -1
index cc5496e28fd..9fb73a8c3eb 100755

Lines of this file are not shown. View the raw message.

t/t5523-push-upstream.sh +0 -1
index 4ad36a31e18..22d3e1162cd 100755

Lines of this file are not shown. View the raw message.

t/t5524-pull-msg.sh +0 -1
index 56716e29ddf..b2be3605f5a 100755

Lines of this file are not shown. View the raw message.

t/t5525-fetch-tagopt.sh +0 -1
index 3a28f1ded5f..45815f73785 100755

Lines of this file are not shown. View the raw message.

t/t5526-fetch-submodules.sh +0 -1
index 2cfb5bd6bb1..5e566205ba4 100755

Lines of this file are not shown. View the raw message.

t/t5527-fetch-odd-refs.sh +0 -1
index 98ece27c6a0..e2770e4541f 100755

Lines of this file are not shown. View the raw message.

t/t5528-push-default.sh +0 -1
index 1305b1cc254..2bd8759a683 100755

Lines of this file are not shown. View the raw message.

t/t5529-push-errors.sh +0 -1
index 17d72578926..80b06a0cd28 100755

Lines of this file are not shown. View the raw message.

t/t5530-upload-pack-error.sh +0 -1
index 7172780d550..558eedf25a4 100755

Lines of this file are not shown. View the raw message.

t/t5531-deep-submodule-push.sh +0 -1
index dcfef67af4e..05debd1134d 100755

Lines of this file are not shown. View the raw message.

t/t5532-fetch-proxy.sh +0 -1
index d664912799b..37558226290 100755

Lines of this file are not shown. View the raw message.

t/t5533-push-cas.sh +0 -1
index 6365d99777e..cba26a872dd 100755

Lines of this file are not shown. View the raw message.

t/t5534-push-signed.sh +0 -1
index d43aee0c327..c91a62b77af 100755

Lines of this file are not shown. View the raw message.

t/t5535-fetch-push-symref.sh +0 -1
index 7122af7fdb5..e8f6d233ffb 100755

Lines of this file are not shown. View the raw message.

t/t5536-fetch-conflicts.sh +0 -1
index 2dcbe790523..23bf6961700 100755

Lines of this file are not shown. View the raw message.

t/t5537-fetch-shallow.sh +0 -1
index cae4d400f32..37f7547a4ca 100755

Lines of this file are not shown. View the raw message.

t/t5538-push-shallow.sh +0 -1
index 6adc3a20a45..e91fcc173e8 100755

Lines of this file are not shown. View the raw message.

t/t5539-fetch-http-shallow.sh +0 -1
index 82fe09d0a97..3ea75d34ca0 100755

Lines of this file are not shown. View the raw message.

t/t5540-http-push-webdav.sh +0 -1
index 27389b09081..37db3dec0c5 100755

Lines of this file are not shown. View the raw message.

t/t5541-http-push-smart.sh +0 -1
index 3ad514bbd4e..71428f3d5c7 100755

Lines of this file are not shown. View the raw message.

t/t5542-push-http-shallow.sh +0 -1
index 07624a1d7f6..c2cc83182f9 100755

Lines of this file are not shown. View the raw message.

t/t5543-atomic-push.sh +0 -1
index 479d1034695..04b47ad84a8 100755

Lines of this file are not shown. View the raw message.

t/t5544-pack-objects-hook.sh +0 -1
index 1a9e14bbccd..89147a052e7 100755

Lines of this file are not shown. View the raw message.

t/t5545-push-options.sh +0 -1
index 64ce56d3aa8..fb13549da7f 100755

Lines of this file are not shown. View the raw message.

t/t5546-receive-limits.sh +0 -1
index 9fc9ba552f1..f1e61c9f095 100755

Lines of this file are not shown. View the raw message.

t/t5547-push-quarantine.sh +0 -1
index 9f899b8c7d7..0798ddab02b 100755

Lines of this file are not shown. View the raw message.

t/t5548-push-porcelain.sh +0 -1
index ecb3877aa4b..6282728eaf3 100755

Lines of this file are not shown. View the raw message.

t/t5549-fetch-push-http.sh +0 -1
index 6377fb6d993..2cdebcb7356 100755

Lines of this file are not shown. View the raw message.

t/t5550-http-fetch-dumb.sh +0 -1
index 5115b8dc230..21795a19bf5 100755

Lines of this file are not shown. View the raw message.

t/t5551-http-fetch-smart.sh +0 -1
index 2ce88535a60..ceb3336a5c4 100755

Lines of this file are not shown. View the raw message.

t/t5552-skipping-fetch-negotiator.sh +0 -1
index 4f2e5ae8dfa..eeddb85b1de 100755

Lines of this file are not shown. View the raw message.

t/t5553-set-upstream.sh +0 -1
index 33e919a17e1..70e3376d31b 100755

Lines of this file are not shown. View the raw message.

t/t5554-noop-fetch-negotiator.sh +0 -1
index 06991e8e8aa..17e73b606d5 100755

Lines of this file are not shown. View the raw message.

t/t5555-http-smart-common.sh +0 -1
index 3dcb3340a36..e47ea1ad106 100755

Lines of this file are not shown. View the raw message.

t/t5557-http-get.sh +0 -1
index 76a4bbd16af..67fcc23f110 100755

Lines of this file are not shown. View the raw message.

t/t5558-clone-bundle-uri.sh +0 -1
index b488b505b92..3816ed5058d 100755

Lines of this file are not shown. View the raw message.

t/t5560-http-backend-noserver.sh +0 -1
index f75068de648..d30cf4f5b83 100755

Lines of this file are not shown. View the raw message.

t/t5561-http-backend.sh +0 -1
index e1d3b8caed0..9c57d843152 100755

Lines of this file are not shown. View the raw message.

t/t5562-http-backend-content-length.sh +0 -1
index 7ee9858a78b..f3b158274c4 100755

Lines of this file are not shown. View the raw message.

t/t5563-simple-http-auth.sh +0 -1
index ba03f6a09fc..317f33af5a7 100755

Lines of this file are not shown. View the raw message.

t/t5564-http-proxy.sh +0 -1
index 4aef99bc28a..b27e481f95b 100755

Lines of this file are not shown. View the raw message.

t/t5570-git-daemon.sh +0 -1
index e3df7d86410..8df4001b722 100755

Lines of this file are not shown. View the raw message.

t/t5571-pre-push-hook.sh +0 -1
index 448134c4bf7..a11b20e3782 100755

Lines of this file are not shown. View the raw message.

t/t5572-pull-submodule.sh +0 -1
index 9b6cf8d88b9..f7650e8475e 100755

Lines of this file are not shown. View the raw message.

t/t5573-pull-verify-signatures.sh +0 -1
index ab05f38a998..a76b54d7de0 100755

Lines of this file are not shown. View the raw message.

t/t5574-fetch-output.sh +0 -1
index f7707326ea1..5883839a04e 100755

Lines of this file are not shown. View the raw message.

t/t5580-unc-paths.sh +0 -1
index d7537a162b2..65ef1a3628e 100755

Lines of this file are not shown. View the raw message.

t/t5581-http-curl-verbose.sh +0 -1
index 724f6100542..cded79c16b5 100755

Lines of this file are not shown. View the raw message.

t/t5582-fetch-negative-refspec.sh +0 -1
index 7fa54a4029a..7a80e47c2b7 100755

Lines of this file are not shown. View the raw message.

t/t5583-push-branches.sh +0 -1
index 320f49c753f..e7e1b6dab66 100755

Lines of this file are not shown. View the raw message.

t/t5600-clone-fail-cleanup.sh +0 -1
index c814afa5656..34b3df40275 100755

Lines of this file are not shown. View the raw message.

t/t5601-clone.sh +0 -1
index 3b5285cfcf3..d0c18660e33 100755

Lines of this file are not shown. View the raw message.

t/t5602-clone-remote-exec.sh +0 -1
index 56329aa160e..cbcceab9d56 100755

Lines of this file are not shown. View the raw message.

t/t5603-clone-dirname.sh +0 -1
index 8ca1f094237..80eb4e04f8b 100755

Lines of this file are not shown. View the raw message.

t/t5604-clone-reference.sh +0 -1
index 9b32db8478a..fa5ca4f522d 100755

Lines of this file are not shown. View the raw message.

t/t5605-clone-local.sh +0 -1
index d9a320abd21..339d8c786f6 100755

Lines of this file are not shown. View the raw message.

t/t5606-clone-options.sh +0 -1
index e93e0d0cc39..8a152377368 100755

Lines of this file are not shown. View the raw message.

t/t5607-clone-bundle.sh +0 -1
index 7ceaa8194d8..489c6570da5 100755

Lines of this file are not shown. View the raw message.

t/t5609-clone-branch.sh +0 -1
index 252e1f7c20f..f86a674a032 100755

Lines of this file are not shown. View the raw message.

t/t5610-clone-detached.sh +0 -1
index 022ed3d87c3..a7ec21eda5a 100755

Lines of this file are not shown. View the raw message.

t/t5611-clone-config.sh +0 -1
index 298d4befab8..4873089a8c9 100755

Lines of this file are not shown. View the raw message.

t/t5612-clone-refspec.sh +0 -1
index 72762de9774..3126cfd7e9d 100755

Lines of this file are not shown. View the raw message.

t/t5613-info-alternate.sh +0 -1
index 7708cbafa98..c752804a8e9 100755

Lines of this file are not shown. View the raw message.

t/t5614-clone-submodules-shallow.sh +0 -1
index c2a2bb453ee..0c85ef834ab 100755

Lines of this file are not shown. View the raw message.

t/t5615-alternate-env.sh +0 -1
index 83513e46a35..9d6aa2187f2 100755

Lines of this file are not shown. View the raw message.

t/t5616-partial-clone.sh +0 -1
index c53e93be2f7..8415884754b 100755

Lines of this file are not shown. View the raw message.

t/t5617-clone-submodules-remote.sh +0 -1
index 5a4d7936a72..68843382493 100755

Lines of this file are not shown. View the raw message.

t/t5618-alternate-refs.sh +0 -1
index f905db0a3fd..2fb6d549d39 100755

Lines of this file are not shown. View the raw message.

t/t5619-clone-local-ambiguous-transport.sh +0 -1
index 1d4efe414da..cce62bf78d3 100755

Lines of this file are not shown. View the raw message.

t/t5700-protocol-v1.sh +0 -1
index 985e04d06e0..a73b4d4ff6a 100755

Lines of this file are not shown. View the raw message.

t/t5701-git-serve.sh +0 -1
index c48830de8fe..de904c16550 100755

Lines of this file are not shown. View the raw message.

t/t5702-protocol-v2.sh +0 -1
index e4ce0592368..d3df81e7852 100755

Lines of this file are not shown. View the raw message.

t/t5703-upload-pack-ref-in-want.sh +0 -1
index f75fae52c83..191097171bc 100755

Lines of this file are not shown. View the raw message.

t/t5704-protocol-violations.sh +0 -1
index 11be64fc038..2b33fced23f 100755

Lines of this file are not shown. View the raw message.

t/t5705-session-id-in-capabilities.sh +0 -1
index b8a722ec27e..ed38c76c290 100755

Lines of this file are not shown. View the raw message.

t/t5730-protocol-v2-bundle-uri-file.sh +0 -1
index 38396df95b1..37bdb725bca 100755

Lines of this file are not shown. View the raw message.

t/t5731-protocol-v2-bundle-uri-git.sh +0 -1
index c199e955fec..8add1b37abc 100755

Lines of this file are not shown. View the raw message.

t/t5732-protocol-v2-bundle-uri-http.sh +0 -1
index a9403e94c6d..129daa02269 100755

Lines of this file are not shown. View the raw message.

t/t5750-bundle-uri-parse.sh +0 -1
index 81bdf58b944..80a3f83ffb7 100755

Lines of this file are not shown. View the raw message.

t/t5801-remote-helpers.sh +0 -1
index d4882288a30..d21877150ed 100755

Lines of this file are not shown. View the raw message.

t/t5802-connect-helper.sh +0 -1
index dd3e6235cd2..a7be375bceb 100755

Lines of this file are not shown. View the raw message.

t/t5810-proto-disable-local.sh +0 -1
index 862610256fb..96a2c46e7a6 100755

Lines of this file are not shown. View the raw message.

t/t5811-proto-disable-git.sh +0 -1
index ed773e74326..b0061e6a373 100755

Lines of this file are not shown. View the raw message.

t/t5812-proto-disable-http.sh +0 -1
index f69959c64ca..96187efaa82 100755

Lines of this file are not shown. View the raw message.

t/t5813-proto-disable-ssh.sh +0 -1
index 2e975dc70ec..045e2fe6ce3 100755

Lines of this file are not shown. View the raw message.

t/t5814-proto-disable-ext.sh +0 -1
index 6fe1a98b2a1..9587a842bc2 100755

Lines of this file are not shown. View the raw message.

t/t5815-submodule-protos.sh +0 -1
index fe899ee82d7..081a07cbae1 100755

Lines of this file are not shown. View the raw message.

t/t5900-repo-selection.sh +0 -1
index a84faac242d..923fc90f877 100755

Lines of this file are not shown. View the raw message.

t/t6000-rev-list-misc.sh +0 -1
index f6d17ee9025..6289a2e8b03 100755

Lines of this file are not shown. View the raw message.

t/t6001-rev-list-graft.sh +0 -1
index 3553bbbfe73..73a2465aa0e 100755

Lines of this file are not shown. View the raw message.

t/t6002-rev-list-bisect.sh +0 -1
index 162cf50778d..b95a0212adf 100755

Lines of this file are not shown. View the raw message.

t/t6003-rev-list-topo-order.sh +0 -1
index 5cf2cee74db..0d7055d46d4 100755

Lines of this file are not shown. View the raw message.

t/t6004-rev-list-path-optim.sh +0 -1
index 5416241edea..cd4f420e2a1 100755

Lines of this file are not shown. View the raw message.

t/t6005-rev-list-count.sh +0 -1
index ee0306aeec0..6cde997e13c 100755

Lines of this file are not shown. View the raw message.

t/t6006-rev-list-format.sh +0 -1
index b0ec2fe865b..eb93d68d7dc 100755

Lines of this file are not shown. View the raw message.

t/t6007-rev-list-cherry-pick-file.sh +0 -1
index 2d337d7287a..6f3e5439771 100755

Lines of this file are not shown. View the raw message.

t/t6008-rev-list-submodule.sh +0 -1
index 2cdef6fdf98..a0a070b4042 100755

Lines of this file are not shown. View the raw message.

t/t6009-rev-list-parent.sh +0 -1
index 91db8fafe83..9c9a8459af9 100755

Lines of this file are not shown. View the raw message.

t/t6010-merge-base.sh +0 -1
index f96ea82e786..44c726ea397 100755

Lines of this file are not shown. View the raw message.

t/t6011-rev-list-with-bad-commit.sh +0 -1
index b2e422cf0f7..bad02cf5b83 100755

Lines of this file are not shown. View the raw message.

t/t6012-rev-list-simplify.sh +0 -1
index 8ed1a215da6..de1e87f1621 100755

Lines of this file are not shown. View the raw message.

t/t6013-rev-list-reverse-parents.sh +0 -1
index 4128269c1d4..39793cbbd66 100755

Lines of this file are not shown. View the raw message.

t/t6014-rev-list-all.sh +0 -1
index 16b8bd1d090..c9bedd29cba 100755

Lines of this file are not shown. View the raw message.

t/t6016-rev-list-graph-simplify-history.sh +0 -1
index 2656d6a6bc4..54b0a6f5f8a 100755

Lines of this file are not shown. View the raw message.

t/t6017-rev-list-stdin.sh +0 -1
index a0a40fe55cd..4821b90e747 100755

Lines of this file are not shown. View the raw message.

t/t6018-rev-list-glob.sh +0 -1
index 3b181f771c2..bb55c7e3c3c 100755

Lines of this file are not shown. View the raw message.

t/t6019-rev-list-ancestry-path.sh +0 -1
index 1aabab69568..738da23628b 100755

Lines of this file are not shown. View the raw message.

t/t6020-bundle-misc.sh +0 -1
index 34b5cd62c20..5d444bfe201 100755

Lines of this file are not shown. View the raw message.

t/t6021-rev-list-exclude-hidden.sh +0 -1
index 51df02105d7..5fe942a2936 100755

Lines of this file are not shown. View the raw message.

t/t6022-rev-list-missing.sh +0 -1
index 127180e1c9a..7553a9cca20 100755

Lines of this file are not shown. View the raw message.

t/t6030-bisect-porcelain.sh +0 -1
index 310affadebe..cdc02706404 100755

Lines of this file are not shown. View the raw message.

t/t6040-tracking-info.sh +0 -1
index acc281c1168..0b719bbae68 100755

Lines of this file are not shown. View the raw message.

t/t6041-bisect-submodule.sh +0 -1
index 3946e18089a..82013fc9037 100755

Lines of this file are not shown. View the raw message.

t/t6050-replace.sh +0 -1
index deba3ca430a..aa1b5351873 100755

Lines of this file are not shown. View the raw message.

t/t6060-merge-index.sh +0 -1
index 1a8b64cce18..e6b3e6ec775 100755

Lines of this file are not shown. View the raw message.

t/t6100-rev-list-in-order.sh +0 -1
index 88ed7bd75a7..e934bc239c5 100755

Lines of this file are not shown. View the raw message.

t/t6101-rev-parse-parents.sh +0 -1
index d20723d6276..5f55ab98d35 100755

Lines of this file are not shown. View the raw message.

t/t6102-rev-list-unexpected-objects.sh +0 -1
index 5d28507efc6..22dfd6d978e 100755

Lines of this file are not shown. View the raw message.

t/t6110-rev-list-sparse.sh +0 -1
index ddefc7f24ee..13c1da53528 100755

Lines of this file are not shown. View the raw message.

t/t6111-rev-list-treesame.sh +0 -1
index f63bc8d3da6..90ff1416400 100755

Lines of this file are not shown. View the raw message.

t/t6112-rev-list-filters-objects.sh +0 -1
index 71e38491fa8..0387f35a326 100755

Lines of this file are not shown. View the raw message.

t/t6113-rev-list-bitmap-filters.sh +0 -1
index a9656a1ec8a..902854cbfaa 100755

Lines of this file are not shown. View the raw message.

t/t6114-keep-packs.sh +0 -1
index 44246f8a63e..a584522ef29 100755

Lines of this file are not shown. View the raw message.

t/t6115-rev-list-du.sh +0 -1
index 21c4a211b15..3385fe9f130 100755

Lines of this file are not shown. View the raw message.

t/t6120-describe.sh +0 -1
index 05ed2510d96..79e0f19deba 100755

Lines of this file are not shown. View the raw message.

t/t6130-pathspec-noglob.sh +0 -1
index 82de25d549a..a7f2603cb4a 100755

Lines of this file are not shown. View the raw message.

t/t6131-pathspec-icase.sh +0 -1
index 770cce026cb..e64d9380838 100755

Lines of this file are not shown. View the raw message.

t/t6132-pathspec-exclude.sh +0 -1
index f31c09c056f..9fdafeb1e90 100755

Lines of this file are not shown. View the raw message.

t/t6133-pathspec-rev-dwim.sh +0 -1
index 6dd4bbbf9fc..0f722fb340d 100755

Lines of this file are not shown. View the raw message.

t/t6134-pathspec-in-submodule.sh +0 -1
index 16ce4cfcc64..9b62a0a65f1 100755

Lines of this file are not shown. View the raw message.

t/t6135-pathspec-with-attrs.sh +0 -1
index 794bc7daf05..67d8c72147c 100755

Lines of this file are not shown. View the raw message.

t/t6136-pathspec-in-bare.sh +0 -1
index 2db37a65969..1284fe01435 100755

Lines of this file are not shown. View the raw message.

t/t6200-fmt-merge-msg.sh +0 -1
index 0a4388f3431..011e5df1e6e 100755

Lines of this file are not shown. View the raw message.

t/t6300-for-each-ref.sh +0 -1
index c39d4e7e9ce..a5c77943854 100755

Lines of this file are not shown. View the raw message.

t/t6301-for-each-ref-errors.sh +0 -1
index 83b8a19d941..e06feb06e91 100755

Lines of this file are not shown. View the raw message.

t/t6302-for-each-ref-filter.sh +0 -1
index a3e1258a4cb..bb02b86c163 100755

Lines of this file are not shown. View the raw message.

t/t6400-merge-df.sh +0 -1
index 27d6efdc9a6..3de4ef6bd9e 100755

Lines of this file are not shown. View the raw message.

t/t6401-merge-criss-cross.sh +0 -1
index 1962310408b..c8e5ff28e80 100755

Lines of this file are not shown. View the raw message.

t/t6402-merge-rename.sh +0 -1
index 729aac9842d..2738b50c2a9 100755

Lines of this file are not shown. View the raw message.

t/t6403-merge-file.sh +0 -1
index fb872c5a113..06ab4d7aede 100755

Lines of this file are not shown. View the raw message.

t/t6404-recursive-merge.sh +0 -1
index 57169ca24b5..ae687f2ce54 100755

Lines of this file are not shown. View the raw message.

t/t6405-merge-symlinks.sh +0 -1
index 29e2b25ce5d..7435fce71e0 100755

Lines of this file are not shown. View the raw message.

t/t6406-merge-attr.sh +0 -1
index 2dfc9a873d4..66e01464b5e 100755

Lines of this file are not shown. View the raw message.

t/t6407-merge-binary.sh +0 -1
index 0753fc95f45..e8a28717cec 100755

Lines of this file are not shown. View the raw message.

t/t6408-merge-up-to-date.sh +0 -1
index 8a1ba6d23a7..7763c1ba980 100755

Lines of this file are not shown. View the raw message.

t/t6409-merge-subtree.sh +0 -1
index 528615b981f..e9ba6f1690d 100755

Lines of this file are not shown. View the raw message.

t/t6411-merge-filemode.sh +0 -1
index b6182723aae..6ae2489286c 100755

Lines of this file are not shown. View the raw message.

t/t6412-merge-large-rename.sh +0 -1
index d0863a8fb51..ca018d11f54 100755

Lines of this file are not shown. View the raw message.

t/t6413-merge-crlf.sh +0 -1
index 647ea1e8382..cd6adf6caac 100755

Lines of this file are not shown. View the raw message.

t/t6414-merge-rename-nocruft.sh +0 -1
index 69fc1c9e697..d7e3c1fa6e6 100755

Lines of this file are not shown. View the raw message.

t/t6415-merge-dir-to-symlink.sh +0 -1
index ae00492c768..2655e295f5a 100755

Lines of this file are not shown. View the raw message.

t/t6416-recursive-corner-cases.sh +0 -1
index 5f414abc892..17b54d625d0 100755

Lines of this file are not shown. View the raw message.

t/t6417-merge-ours-theirs.sh +0 -1
index 482b73a998f..62d1406119e 100755

Lines of this file are not shown. View the raw message.

t/t6418-merge-text-auto.sh +0 -1
index 48a62cb8556..41288a60ceb 100755

Lines of this file are not shown. View the raw message.

t/t6421-merge-partial-clone.sh +0 -1
index 30349a466e7..b99f29ef9ba 100755

Lines of this file are not shown. View the raw message.

t/t6422-merge-rename-corner-cases.sh +0 -1
index 80d7b5eabaf..62b49c67e22 100755

Lines of this file are not shown. View the raw message.

t/t6423-merge-rename-directories.sh +0 -1
index 4aaaf38be68..88d1cf2cde9 100755

Lines of this file are not shown. View the raw message.

t/t6424-merge-unrelated-index-changes.sh +0 -1
index a7ea8acb845..7677c5f08d0 100755

Lines of this file are not shown. View the raw message.

t/t6425-merge-rename-delete.sh +0 -1
index b95b064311b..c15d031b165 100755

Lines of this file are not shown. View the raw message.

t/t6426-merge-skip-unneeded-updates.sh +0 -1
index 62f01803253..b059475ed03 100755

Lines of this file are not shown. View the raw message.

t/t6427-diff3-conflict-markers.sh +0 -1
index a13271b3490..dd5fe6a4021 100755

Lines of this file are not shown. View the raw message.

t/t6428-merge-conflicts-sparse.sh +0 -1
index 8a79bc2e921..9919c3fa7cd 100755

Lines of this file are not shown. View the raw message.

t/t6429-merge-sequence-rename-caching.sh +0 -1
index cb1c4ceef76..0f39ed0d08a 100755

Lines of this file are not shown. View the raw message.

t/t6430-merge-recursive.sh +0 -1
index 555f00f78a1..ca15e6dd6da 100755

Lines of this file are not shown. View the raw message.

t/t6431-merge-criscross.sh +0 -1
index 3fe14cd73e8..3824756a02e 100755

Lines of this file are not shown. View the raw message.

t/t6432-merge-recursive-space-options.sh +0 -1
index c93538b0c38..db4b77e63d2 100755

Lines of this file are not shown. View the raw message.

t/t6433-merge-toplevel.sh +0 -1
index ed7866d3e95..0f611c40031 100755

Lines of this file are not shown. View the raw message.

t/t6434-merge-recursive-rename-options.sh +0 -1
index df1d0c156c5..a11707835b4 100755

Lines of this file are not shown. View the raw message.

t/t6435-merge-sparse.sh +0 -1
index 78628fb248a..fde4aa3cd1a 100755

Lines of this file are not shown. View the raw message.

t/t6436-merge-overwrite.sh +0 -1
index ccc620477d4..4f4376421e7 100755

Lines of this file are not shown. View the raw message.

t/t6437-submodule-merge.sh +0 -1
index 7a3f1cb27c1..4815559157b 100755

Lines of this file are not shown. View the raw message.

t/t6438-submodule-directory-file-conflicts.sh +0 -1
index 3594190af84..8df67a0ef99 100755

Lines of this file are not shown. View the raw message.

t/t6439-merge-co-error-msgs.sh +0 -1
index a9804ae42f1..55bd744a3f4 100755

Lines of this file are not shown. View the raw message.

t/t6500-gc.sh +0 -1
index ee074b99b70..53784559681 100755

Lines of this file are not shown. View the raw message.

t/t6501-freshen-objects.sh +0 -1
index 4521508b83a..ddef1ca3915 100755

Lines of this file are not shown. View the raw message.

t/t6600-test-reach.sh +0 -1
index 307deefed2c..2591f8b8b39 100755

Lines of this file are not shown. View the raw message.

t/t6700-tree-depth.sh +0 -1
index 9e70a7c763a..0f6a2ad9b59 100755

Lines of this file are not shown. View the raw message.

t/t7001-mv.sh +0 -1
index 69c9190772f..25334b50622 100755

Lines of this file are not shown. View the raw message.

t/t7002-mv-sparse-checkout.sh +0 -1
index 57969ce805a..26582ae4e5f 100755

Lines of this file are not shown. View the raw message.

t/t7003-filter-branch.sh +0 -1
index bf3e3f0b678..5ab4d41ee7c 100755

Lines of this file are not shown. View the raw message.

t/t7004-tag.sh +0 -1
index 42b3327e69b..b1316e62f46 100755

Lines of this file are not shown. View the raw message.

t/t7005-editor.sh +0 -1
index b9822294fed..5fcf281dfbf 100755

Lines of this file are not shown. View the raw message.

t/t7006-pager.sh +0 -1
index a0296d6ca40..932c26cb45b 100755

Lines of this file are not shown. View the raw message.

t/t7007-show.sh +0 -1
index f908a4d1abc..d6cc69e0f2c 100755

Lines of this file are not shown. View the raw message.

t/t7008-filter-branch-null-sha1.sh +0 -1
index 0ce8fd2c895..93fbc92b8db 100755

Lines of this file are not shown. View the raw message.

t/t7010-setup.sh +0 -1
index d9add2162e9..520f96d09fb 100755

Lines of this file are not shown. View the raw message.

t/t7011-skip-worktree-reading.sh +0 -1
index c86abd99bf9..1ff2714cb49 100755

Lines of this file are not shown. View the raw message.

t/t7012-skip-worktree-writing.sh +0 -1
index d984200c173..cd5c20fe51b 100755

Lines of this file are not shown. View the raw message.

t/t7030-verify-tag.sh +0 -1
index effa826744b..6f526c37c27 100755

Lines of this file are not shown. View the raw message.

t/t7031-verify-tag-signed-ssh.sh +0 -1
index 0efd17b363b..80359d48f7c 100755

Lines of this file are not shown. View the raw message.

t/t7060-wtstatus.sh +0 -1
index aaeb4a53344..0f4344c55e6 100755

Lines of this file are not shown. View the raw message.

t/t7061-wtstatus-ignore.sh +0 -1
index 64145a05b1f..2f9bea9793c 100755

Lines of this file are not shown. View the raw message.

t/t7062-wtstatus-ignorecase.sh +0 -1
index caf372a3d42..73709dbeee2 100755

Lines of this file are not shown. View the raw message.

t/t7063-status-untracked-cache.sh +0 -1
index 13fea7931cd..8929ef481f9 100755

Lines of this file are not shown. View the raw message.

t/t7064-wtstatus-pv2.sh +0 -1
index 2458e9d0eba..8bbc5ce6d98 100755

Lines of this file are not shown. View the raw message.

t/t7101-reset-empty-subdirs.sh +0 -1
index 89cf98b30c8..33d5d5b76e7 100755

Lines of this file are not shown. View the raw message.

t/t7102-reset.sh +0 -1
index e9a6cc72658..0503a64d3f2 100755

Lines of this file are not shown. View the raw message.

t/t7103-reset-bare.sh +0 -1
index 18bbd9975eb..871e438118a 100755

Lines of this file are not shown. View the raw message.

t/t7104-reset-hard.sh +0 -1
index cf9697eba9a..7948ec392b3 100755

Lines of this file are not shown. View the raw message.

t/t7105-reset-patch.sh +0 -1
index f4f3b7a677a..fced8adabd4 100755

Lines of this file are not shown. View the raw message.

t/t7106-reset-unborn-branch.sh +0 -1
index 88d1c8adf42..df20c0f0ccd 100755

Lines of this file are not shown. View the raw message.

t/t7107-reset-pathspec-file.sh +0 -1
index 020db201d57..9162f591fb2 100755

Lines of this file are not shown. View the raw message.

t/t7110-reset-merge.sh +0 -1
index 7ee180f81da..61669a2d210 100755

Lines of this file are not shown. View the raw message.

t/t7111-reset-table.sh +0 -1
index 01b7c3503ca..07b919731ae 100755

Lines of this file are not shown. View the raw message.

t/t7112-reset-submodule.sh +0 -1
index b0d3d93b0b4..a3e2413bc33 100755

Lines of this file are not shown. View the raw message.

t/t7113-post-index-change-hook.sh +0 -1
index 58e55a7c779..c10d94fe3d3 100755

Lines of this file are not shown. View the raw message.

t/t7201-co.sh +0 -1
index 2d984eb4c6a..793da6e64ec 100755

Lines of this file are not shown. View the raw message.

t/t7300-clean.sh +0 -1
index 54fed91e391..00d40701562 100755

Lines of this file are not shown. View the raw message.

t/t7301-clean-interactive.sh +0 -1
index 4afe53c66ae..f743e5b8f44 100755

Lines of this file are not shown. View the raw message.

t/t7400-submodule-basic.sh +0 -1
index 098d8833b65..981488885fb 100755

Lines of this file are not shown. View the raw message.

t/t7401-submodule-summary.sh +0 -1
index 542b3331a78..9c3cc4cf404 100755

Lines of this file are not shown. View the raw message.

t/t7402-submodule-rebase.sh +0 -1
index aa2fdc31d1a..25b33a1e875 100755

Lines of this file are not shown. View the raw message.

t/t7403-submodule-sync.sh +0 -1
index 19b6135d117..bf97d4f8511 100755

Lines of this file are not shown. View the raw message.

t/t7406-submodule-update.sh +0 -1
index 0f0c86f9cb2..297c6c3b5cc 100755

Lines of this file are not shown. View the raw message.

t/t7407-submodule-foreach.sh +0 -1
index 9f688932613..8d7b234beb8 100755

Lines of this file are not shown. View the raw message.

t/t7408-submodule-reference.sh +0 -1
index 7e1afa9ce47..f860e7bbf49 100755

Lines of this file are not shown. View the raw message.

t/t7409-submodule-detached-work-tree.sh +0 -1
index 574a6fc526e..374ed481e9c 100755

Lines of this file are not shown. View the raw message.

t/t7411-submodule-config.sh +0 -1
index af0de496e07..31271f8e0a6 100755

Lines of this file are not shown. View the raw message.

t/t7412-submodule-absorbgitdirs.sh +0 -1
index f7783218576..0490499573f 100755

Lines of this file are not shown. View the raw message.

t/t7413-submodule-is-active.sh +0 -1
index b9c89b10198..9509dc18fde 100755

Lines of this file are not shown. View the raw message.

t/t7414-submodule-mistakes.sh +0 -1
index 24f30e3bf9c..e2d75c7f16c 100755

Lines of this file are not shown. View the raw message.

t/t7416-submodule-dash-url.sh +0 -1
index 2ab566e7178..0c605fd271a 100755

Lines of this file are not shown. View the raw message.

t/t7417-submodule-path-url.sh +0 -1
index dbbb3853dc0..5e3051da8bb 100755

Lines of this file are not shown. View the raw message.

t/t7418-submodule-sparse-gitmodules.sh +0 -1
index e1d9bf2ee30..dde11ecce80 100755

Lines of this file are not shown. View the raw message.

t/t7419-submodule-set-branch.sh +0 -1
index a5d1bc5c54a..08ed51d34ff 100755

Lines of this file are not shown. View the raw message.

t/t7420-submodule-set-url.sh +0 -1
index d7fe910bbe1..bf7f15ee797 100755

Lines of this file are not shown. View the raw message.

t/t7421-submodule-summary-add.sh +0 -1
index 479c8fdde11..ce64d8b1372 100755

Lines of this file are not shown. View the raw message.

t/t7422-submodule-output.sh +0 -1
index c1686d6bb5f..f21e9203678 100755

Lines of this file are not shown. View the raw message.

t/t7423-submodule-symlinks.sh +0 -1
index f45d8062018..3d3c7af3ce5 100755

Lines of this file are not shown. View the raw message.

t/t7424-submodule-mixed-ref-formats.sh +0 -1
index b43ef2ba675..559713b6077 100755

Lines of this file are not shown. View the raw message.

t/t7450-bad-git-dotfiles.sh +0 -1
index 4a9c22c9e2b..93677946411 100755

Lines of this file are not shown. View the raw message.

t/t7500-commit-template-squash-signoff.sh +0 -1
index 379d3ed3413..4dca8d97a77 100755

Lines of this file are not shown. View the raw message.

t/t7501-commit-basic-functionality.sh +0 -1
index 52f5e28154e..cc12f99f115 100755

Lines of this file are not shown. View the raw message.

t/t7502-commit-porcelain.sh +0 -1
index 84f1ff52b67..b37e2018a74 100755

Lines of this file are not shown. View the raw message.

t/t7503-pre-commit-and-pre-merge-commit-hooks.sh +0 -1
index aa004b70a8d..ad1eb64ba0d 100755

Lines of this file are not shown. View the raw message.

t/t7504-commit-msg-hook.sh +0 -1
index d1255228d5f..c0f024eb1ef 100755

Lines of this file are not shown. View the raw message.

t/t7505-prepare-commit-msg-hook.sh +0 -1
index b88383df9e4..2128142a61c 100755

Lines of this file are not shown. View the raw message.

t/t7506-status-submodule.sh +0 -1
index 46566d529e8..185fe7e78ef 100755

Lines of this file are not shown. View the raw message.

t/t7507-commit-verbose.sh +0 -1
index 4c7db19ce7e..b53d71c0862 100755

Lines of this file are not shown. View the raw message.

t/t7508-status.sh +0 -1
index 773383fefb5..f9a5c98f3f3 100755

Lines of this file are not shown. View the raw message.

t/t7509-commit-authorship.sh +0 -1
index fd8c8f8f0bc..8e373b566b0 100755

Lines of this file are not shown. View the raw message.

t/t7510-signed-commit.sh +0 -1
index eb229082e40..0d2dd29fe6a 100755

Lines of this file are not shown. View the raw message.

t/t7511-status-index.sh +0 -1
index 4ffa45a7bf3..b5fdc048a54 100755

Lines of this file are not shown. View the raw message.

t/t7512-status-help.sh +0 -1
index cdd5f2c6979..802f8f704c6 100755

Lines of this file are not shown. View the raw message.

t/t7513-interpret-trailers.sh +0 -1
index 502752c0f3c..818a8dafbd2 100755

Lines of this file are not shown. View the raw message.

t/t7514-commit-patch.sh +0 -1
index 03ba0c0e734..075db69b429 100755

Lines of this file are not shown. View the raw message.

t/t7515-status-symlinks.sh +0 -1
index e3d6bb67bf9..9f989be01b9 100755

Lines of this file are not shown. View the raw message.

t/t7516-commit-races.sh +0 -1
index bb95f09810b..de7c4ca7901 100755

Lines of this file are not shown. View the raw message.

t/t7517-per-repo-email.sh +0 -1
index efc6496e2b2..163ae804685 100755

Lines of this file are not shown. View the raw message.

t/t7518-ident-corner-cases.sh +0 -1
index b37de0af49f..d3ea4d603ff 100755

Lines of this file are not shown. View the raw message.

t/t7519-status-fsmonitor.sh +0 -1
index 0f88a58a819..7ee69ecdd4a 100755

Lines of this file are not shown. View the raw message.

t/t7520-ignored-hook-warning.sh +0 -1
index 3b63c34a309..bcfe15d51d0 100755

Lines of this file are not shown. View the raw message.

t/t7521-ignored-mode.sh +0 -1
index edce10f998e..a88b02b06ed 100755

Lines of this file are not shown. View the raw message.

t/t7524-commit-summary.sh +0 -1
index a8fceb6a47c..82b5e4aa412 100755

Lines of this file are not shown. View the raw message.

t/t7525-status-rename.sh +0 -1
index a9210d3a3a9..d409de1a33f 100755

Lines of this file are not shown. View the raw message.

t/t7526-commit-pathspec-file.sh +0 -1
index c97c550021e..3aabbf35a1c 100755

Lines of this file are not shown. View the raw message.

t/t7528-signed-commit-ssh.sh +0 -1
index 68e18856b66..065f7806362 100755

Lines of this file are not shown. View the raw message.

t/t7600-merge.sh +0 -1
index 65fd3d8552b..ef54cff4faa 100755

Lines of this file are not shown. View the raw message.

t/t7601-merge-pull-config.sh +0 -1
index c83298ba683..199a1d5db31 100755

Lines of this file are not shown. View the raw message.

t/t7602-merge-octopus-many.sh +0 -1
index 3669d33bd5a..ff085b086cc 100755

Lines of this file are not shown. View the raw message.

t/t7603-merge-reduce-heads.sh +0 -1
index 0e85b21ec82..4887ca705b3 100755

Lines of this file are not shown. View the raw message.

t/t7604-merge-custom-message.sh +0 -1
index eca75551016..cd4f9607dc1 100755

Lines of this file are not shown. View the raw message.

t/t7605-merge-resolve.sh +0 -1
index 62d935d31c2..5d56c385464 100755

Lines of this file are not shown. View the raw message.

t/t7606-merge-custom.sh +0 -1
index 135cb230856..81fb7c474c1 100755

Lines of this file are not shown. View the raw message.

t/t7607-merge-state.sh +0 -1
index 9001674f2ea..89a62ac53b3 100755

Lines of this file are not shown. View the raw message.

t/t7608-merge-messages.sh +0 -1
index 2179938c437..0b908ab2e71 100755

Lines of this file are not shown. View the raw message.

t/t7609-mergetool--lib.sh +0 -1
index 8b1c3bd39f2..330d6d603d7 100755

Lines of this file are not shown. View the raw message.

t/t7610-mergetool.sh +0 -1
index 5c5e79e9905..22b3a85b3e9 100755

Lines of this file are not shown. View the raw message.

t/t7611-merge-abort.sh +0 -1
index 992a8f98749..d6975ca48df 100755

Lines of this file are not shown. View the raw message.

t/t7612-merge-verify-signatures.sh +0 -1
index 84ddb568517..337fac0d844 100755

Lines of this file are not shown. View the raw message.

t/t7614-merge-signoff.sh +0 -1
index cf96a35e8e7..fee258d4f0c 100755

Lines of this file are not shown. View the raw message.

t/t7615-diff-algo-with-mergy-operations.sh +0 -1
index 9a83be518cb..3b1aad0167a 100755

Lines of this file are not shown. View the raw message.

t/t7700-repack.sh +0 -1
index c4c3d1a15d9..be1188e7365 100755

Lines of this file are not shown. View the raw message.

t/t7701-repack-unpack-unreachable.sh +0 -1
index fe6c3e77a3c..5715f4d69a4 100755

Lines of this file are not shown. View the raw message.

t/t7702-repack-cyclic-alternate.sh +0 -1
index d151d4f6036..cd91766e78a 100755

Lines of this file are not shown. View the raw message.

t/t7703-repack-geometric.sh +0 -1
index 8877aea98ba..9fc1626fbfd 100755

Lines of this file are not shown. View the raw message.

t/t7704-repack-cruft.sh +0 -1
index 5db9f4e10f7..959e6e26488 100755

Lines of this file are not shown. View the raw message.

t/t7800-difftool.sh +0 -1
index f67b9345b8a..cc917b257e3 100755

Lines of this file are not shown. View the raw message.

t/t7810-grep.sh +0 -1
index 1bdb8e5a999..64ac4f04ee9 100755

Lines of this file are not shown. View the raw message.

t/t7811-grep-open.sh +0 -1
index fe38d88a1a6..3160be59fd2 100755

Lines of this file are not shown. View the raw message.

t/t7812-grep-icase-non-ascii.sh +0 -1
index 31c66b63c2c..ac7be547145 100755

Lines of this file are not shown. View the raw message.

t/t7813-grep-icase-iso.sh +0 -1
index 1227885737b..701e08a8e59 100755

Lines of this file are not shown. View the raw message.

t/t7814-grep-recurse-submodules.sh +0 -1
index 55ed630e77e..167fe661504 100755

Lines of this file are not shown. View the raw message.

t/t7815-grep-binary.sh +0 -1
index ac871287c03..90ebb64f46e 100755

Lines of this file are not shown. View the raw message.

t/t7816-grep-binary-pattern.sh +0 -1
index 4353be5adb7..0088eaa0c91 100755

Lines of this file are not shown. View the raw message.

t/t7817-grep-sparse-checkout.sh +0 -1
index 0ba7817fb76..eb595645657 100755

Lines of this file are not shown. View the raw message.

t/t7900-maintenance.sh +0 -1
index c224c8450c8..57d64b5b40b 100755

Lines of this file are not shown. View the raw message.

t/t8001-annotate.sh +0 -1
index d4346989195..d7167f55397 100755

Lines of this file are not shown. View the raw message.

t/t8002-blame.sh +0 -1
index 35966340397..0147de304b4 100755

Lines of this file are not shown. View the raw message.

t/t8003-blame-corner-cases.sh +0 -1
index 6288352f577..731265541ac 100755

Lines of this file are not shown. View the raw message.

t/t8004-blame-with-conflicts.sh +0 -1
index 2c2a0b33f9b..35414a53363 100755

Lines of this file are not shown. View the raw message.

t/t8005-blame-i18n.sh +0 -1
index fa765aff99a..81847ffb9a8 100755

Lines of this file are not shown. View the raw message.

t/t8006-blame-textconv.sh +0 -1
index 42f8be25a3f..07a287ffd3e 100755

Lines of this file are not shown. View the raw message.

t/t8007-cat-file-textconv.sh +0 -1
index c8266f17f14..c3735fb50de 100755

Lines of this file are not shown. View the raw message.

t/t8008-blame-formats.sh +0 -1
index fb5d225a671..c12a4196d66 100755

Lines of this file are not shown. View the raw message.

t/t8009-blame-vs-topicbranches.sh +0 -1
index cc511084648..c808b819621 100755

Lines of this file are not shown. View the raw message.

t/t8010-cat-file-filters.sh +0 -1
index eb64b766bdf..b3be2aa387f 100755

Lines of this file are not shown. View the raw message.

t/t8011-blame-split-file.sh +0 -1
index da1801f4d23..c66494f5ba7 100755

Lines of this file are not shown. View the raw message.

t/t8012-blame-colors.sh +0 -1
index 9a79c109f2e..c3a5f6d01ff 100755

Lines of this file are not shown. View the raw message.

t/t8013-blame-ignore-revs.sh +0 -1
index d33788d8677..370b7681492 100755

Lines of this file are not shown. View the raw message.

t/t8014-blame-ignore-fuzzy.sh +0 -1
index 933222cea15..f5dcbd9e824 100755

Lines of this file are not shown. View the raw message.

t/t9001-send-email.sh +0 -1
index e2430f7bfab..0c1af43f6fb 100755

Lines of this file are not shown. View the raw message.

t/t9002-column.sh +0 -1
index d5b98e615bc..7353815c11b 100755

Lines of this file are not shown. View the raw message.

t/t9003-help-autocorrect.sh +0 -1
index 3be063afab5..85a5074b5e2 100755

Lines of this file are not shown. View the raw message.

t/t9200-git-cvsexportcommit.sh +0 -1
index 3d4842164c8..a44eabf0d80 100755

Lines of this file are not shown. View the raw message.

t/t9210-scalar.sh +0 -1
index a30b2c9f705..027235d61aa 100755

Lines of this file are not shown. View the raw message.

t/t9211-scalar-clone.sh +0 -1
index c16ea67c1dc..7869f45ee64 100755

Lines of this file are not shown. View the raw message.

t/t9300-fast-import.sh +0 -1
index 6224f54d4d2..9bd66ecf2e0 100755

Lines of this file are not shown. View the raw message.

t/t9301-fast-import-notes.sh +0 -1
index 58413221e6a..1ae4d7c0d37 100755

Lines of this file are not shown. View the raw message.

t/t9302-fast-import-unpack-limit.sh +0 -1
index d8b1f9442e8..ec8c8652c6c 100755

Lines of this file are not shown. View the raw message.

t/t9303-fast-import-compression.sh +0 -1
index 4f5bf40587c..f15c8c0213e 100755

Lines of this file are not shown. View the raw message.

t/t9304-fast-import-marks.sh +0 -1
index 1f776a80f3b..6c50adca009 100755

Lines of this file are not shown. View the raw message.

t/t9350-fast-export.sh +0 -1
index 9595dfef2ee..aa33791b77b 100755

Lines of this file are not shown. View the raw message.

t/t9351-fast-export-anonymize.sh +0 -1
index c0d9d7be754..156a6474847 100755

Lines of this file are not shown. View the raw message.

t/t9400-git-cvsserver-server.sh +0 -1
index 6da7440e73c..e499c7f9551 100755

Lines of this file are not shown. View the raw message.

t/t9401-git-cvsserver-crlf.sh +0 -1
index a67e6abd49d..a34805acdc2 100755

Lines of this file are not shown. View the raw message.

t/t9402-git-cvsserver-refs.sh +0 -1
index c847120d52d..2ee41f9443e 100755

Lines of this file are not shown. View the raw message.

t/t9500-gitweb-standalone-no-errors.sh +0 -1
index ccfa4153840..7679780fb87 100755

Lines of this file are not shown. View the raw message.

t/t9501-gitweb-standalone-http-status.sh +0 -1
index c900231079c..32814e75df5 100755

Lines of this file are not shown. View the raw message.

t/t9502-gitweb-standalone-parse-output.sh +0 -1
index b41ea193314..81d56255579 100755

Lines of this file are not shown. View the raw message.

t/t9600-cvsimport.sh +0 -1
index 41fcf3606b3..56808492189 100755

Lines of this file are not shown. View the raw message.

t/t9601-cvsimport-vendor-branch.sh +0 -1
index e0076694957..116cddba3a5 100755

Lines of this file are not shown. View the raw message.

t/t9602-cvsimport-branches-tags.sh +0 -1
index 3768e3bd8cc..e5266c9a872 100755

Lines of this file are not shown. View the raw message.

t/t9603-cvsimport-patchsets.sh +0 -1
index 2a387fdbaae..1ee966c256a 100755

Lines of this file are not shown. View the raw message.

t/t9604-cvsimport-timestamps.sh +0 -1
index 9cf0685d56f..57a3bef2ece 100755

Lines of this file are not shown. View the raw message.

t/t9700-perl-git.sh +0 -1
index 44316971224..9c9e3b5eb11 100755

Lines of this file are not shown. View the raw message.

t/t9800-git-p4-basic.sh +0 -1
index 3e6dfce2483..0816763e466 100755

Lines of this file are not shown. View the raw message.

t/t9801-git-p4-branch.sh +0 -1
index cdbfacc727a..c598011635a 100755

Lines of this file are not shown. View the raw message.

t/t9802-git-p4-filetype.sh +0 -1
index 1bc48305b01..df01a5d3389 100755

Lines of this file are not shown. View the raw message.

t/t9803-git-p4-shell-metachars.sh +0 -1
index ab7fe162668..2913277013d 100755

Lines of this file are not shown. View the raw message.

t/t9804-git-p4-label.sh +0 -1
index c8963fd3980..32364571063 100755

Lines of this file are not shown. View the raw message.

t/t9805-git-p4-skip-submit-edit.sh +0 -1
index 72dce3d2b46..90ef647db7e 100755

Lines of this file are not shown. View the raw message.

t/t9806-git-p4-options.sh +0 -1
index e4ce44ebf37..c26d2974330 100755

Lines of this file are not shown. View the raw message.

t/t9808-git-p4-chdir.sh +0 -1
index 342f7f3d4a0..58a9b3b71e6 100755

Lines of this file are not shown. View the raw message.

t/t9809-git-p4-client-view.sh +0 -1
index f33fdea889e..9c9710d8c7b 100755

Lines of this file are not shown. View the raw message.

t/t9810-git-p4-rcs.sh +0 -1
index 15e32c9f353..5fe83315ecd 100755

Lines of this file are not shown. View the raw message.

t/t9811-git-p4-label-import.sh +0 -1
index 52a4b0af811..5ac5383fb71 100755

Lines of this file are not shown. View the raw message.

t/t9812-git-p4-wildcards.sh +0 -1
index 46aa5fd56c7..254a7c24469 100755

Lines of this file are not shown. View the raw message.

t/t9813-git-p4-preserve-users.sh +0 -1
index 0efea28da2c..fd018c87a80 100755

Lines of this file are not shown. View the raw message.

t/t9814-git-p4-rename.sh +0 -1
index 00df6ebd3bd..2a9838f37fe 100755

Lines of this file are not shown. View the raw message.

t/t9815-git-p4-submit-fail.sh +0 -1
index 92ef9d8c242..c766fd159f1 100755

Lines of this file are not shown. View the raw message.

t/t9816-git-p4-locked.sh +0 -1
index e687fbc25f6..5e904ac80d8 100755

Lines of this file are not shown. View the raw message.

t/t9817-git-p4-exclude.sh +0 -1
index 3deb334fed1..ec3d937c6a7 100755

Lines of this file are not shown. View the raw message.

t/t9818-git-p4-block.sh +0 -1
index 091bb72bdb6..de591d875c2 100755

Lines of this file are not shown. View the raw message.

t/t9819-git-p4-case-folding.sh +0 -1
index 985be203571..b4d93f0c17c 100755

Lines of this file are not shown. View the raw message.

t/t9820-git-p4-editor-handling.sh +0 -1
index 48e4dfb95c0..fa1bba1dd93 100755

Lines of this file are not shown. View the raw message.

t/t9821-git-p4-path-variations.sh +0 -1
index 49691c53dad..ef80f1690bc 100755

Lines of this file are not shown. View the raw message.

t/t9822-git-p4-path-encoding.sh +0 -1
index e62ed49f51e..572d395498e 100755

Lines of this file are not shown. View the raw message.

t/t9823-git-p4-mock-lfs.sh +0 -1
index 98a40d8af37..88b76dc4d6c 100755

Lines of this file are not shown. View the raw message.

t/t9825-git-p4-handle-utf16-without-bom.sh +0 -1
index d0b86537dd9..6a60b323493 100755

Lines of this file are not shown. View the raw message.

t/t9826-git-p4-keep-empty-commits.sh +0 -1
index 54083f842e9..fd64afe064e 100755

Lines of this file are not shown. View the raw message.

t/t9827-git-p4-change-filetype.sh +0 -1
index 3476ea2fd3b..d3670bd7a24 100755

Lines of this file are not shown. View the raw message.

t/t9828-git-p4-map-user.sh +0 -1
index 7c8f9e39304..ca6c2942bdf 100755

Lines of this file are not shown. View the raw message.

t/t9829-git-p4-jobs.sh +0 -1
index 3fc0948d9cf..88cfb1fcd3f 100755

Lines of this file are not shown. View the raw message.

t/t9830-git-p4-symlink-dir.sh +0 -1
index 02561a7f0e6..3fb6960c18f 100755

Lines of this file are not shown. View the raw message.

t/t9831-git-p4-triggers.sh +0 -1
index f287f41e374..ff6c0352e68 100755

Lines of this file are not shown. View the raw message.

t/t9832-unshelve.sh +0 -1
index a2667754086..6b3cb0414aa 100755

Lines of this file are not shown. View the raw message.

t/t9833-errors.sh +0 -1
index da1d30c142c..e22369ccdf5 100755

Lines of this file are not shown. View the raw message.

t/t9834-git-p4-file-dir-bug.sh +0 -1
index 565870fc740..dac67e89d7d 100755

Lines of this file are not shown. View the raw message.

t/t9835-git-p4-metadata-encoding-python2.sh +0 -1
index ad20ffdeded..036bf79c667 100755

Lines of this file are not shown. View the raw message.

t/t9836-git-p4-metadata-encoding-python3.sh +0 -1
index 71ae763399c..63350dc4b5c 100755

Lines of this file are not shown. View the raw message.

t/t9850-shell.sh +0 -1
index f503f16d1b6..36566ace21b 100755

Lines of this file are not shown. View the raw message.

t/t9901-git-web--browse.sh +0 -1
index 19f56e5680f..de7152f8271 100755

Lines of this file are not shown. View the raw message.

t/t9902-completion.sh +0 -1
index cc6aa9f0cd3..932d5ad7591 100755

Lines of this file are not shown. View the raw message.

t/t9903-bash-prompt.sh +0 -1
index 95e9955bca1..d667dda654e 100755

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty

Part of the diff is not shown here. View the raw message.

#37 lore raw
In reply to Patrick Steinhardt
Quoted 11 lines · Patrick Steinhardt

Hi,

this is the last part of my series of memory leak fixes. This series goes a bit further than past series:

- Patches 1 to 16 plug remaining memory leaks exposed by our test suite.

- Patches 17 to 21 remove the last remaining UNLEAK() annotations and ultimately remove the macro itself.

Quoted 8 lines

- Patch 22 works around a bug in the leak sanitizer itself.

- Patches 23 and 24 drop annotations where leak-free tests pass with the leak sanitizer.

- Patches 25 and 26 unconditionally enable leak checking in all newly added tests and then drop the TEST_PASSES_SANITIZE_LEAK annotation.

Hi Patrick.

Thanks for working on this.

It's been a while since 956d2e4639 (tests: add a test mode for SANITIZE=leak, run it in CI, 2021-09-23). This series marks certainly another milestone.

I have left a few comments, none of them important. The series looks good to me. Just in case you re-roll, while reading the series I spotted some nits:

bisect.c +1 -1
index 518be70aa3..0e804086cb 100644
@@ -641,7 +641,7 @@ static struct commit_list *skip_away(struct commit_list *list, int count)
                        else if (previous)
                                result = previous;
                        else
-                               result =  list;
+                               result = list;
                        break;
                }
                previous = cur;
builtin/init-db.c +3 -3
index 9e069e2742..096f96b9c4 100644
@@ -248,9 +248,9 @@ int cmd_init_db(int argc,
        }
 
        flags |= INIT_DB_EXIST_OK;
-       ret =  init_db(git_dir, real_git_dir, template_dir, hash_algo,
-                      ref_storage_format, initial_branch,
-                      init_shared_repository, flags);
+       ret = init_db(git_dir, real_git_dir, template_dir, hash_algo,
+                     ref_storage_format, initial_branch,
+                     init_shared_repository, flags);
 
        free(template_dir_to_free);
        free(real_git_dir_to_free);
Quoted 20 lines

So once this series lands, the expectation is that any newly added test needs to be leak free by default. We still have an escape hatch in the form of the SANITIZE_LEAK prerequisite, but patch authors are expected to provide good arguments why their test cannot be made leak free.

This series is built on top of 8f8d6eee53 (The seventh batch, 2024-11-01) with ps/leakfixes-part-9 at c810549be1 (list-objects-filter-options: work around reported leak on error, 2024-11-05) merged into it.

The series has some trivial conflicts with the removed test annotations when merging with seen. There are two topics in-flight that introduce new memory leaks (ds/path-walk and cc/promisor-remote-capability), both of which are fixed by the below patch. I've sent a message in response to the individual commits that introduce the leaks.

Thanks!

Patrick

#38 lore raw
Quoted 23 lines · Rubén Justo
Quoted 11 lines · Patrick Steinhardt

Hi,

this is the last part of my series of memory leak fixes. This series goes a bit further than past series:

- Patches 1 to 16 plug remaining memory leaks exposed by our test suite.

- Patches 17 to 21 remove the last remaining UNLEAK() annotations and ultimately remove the macro itself.

Quoted 8 lines

- Patch 22 works around a bug in the leak sanitizer itself.

- Patches 23 and 24 drop annotations where leak-free tests pass with the leak sanitizer.

- Patches 25 and 26 unconditionally enable leak checking in all newly added tests and then drop the TEST_PASSES_SANITIZE_LEAK annotation.

Hi Patrick.

Quoted 8 lines

Thanks for working on this.

It's been a while since 956d2e4639 (tests: add a test mode for SANITIZE=leak, run it in CI, 2021-09-23). This series marks certainly another milestone.

I have left a few comments, none of them important. The series looks good to me. Just in case you re-roll, while reading the series I spotted some nits:

Thanks for your review, I've addressed your comments and will send out v2 soonish!

patrick

#39 lore raw

v2 cover Memory leak fixes (pt.10, final)

In reply to Patrick Steinhardt

Hi,

this is the last part of my series of memory leak fixes. This series goes a bit further than past series:

- Patches 1 to 16 plug remaining memory leaks exposed by our test suite.

- Patches 17 to 22 remove the last remaining UNLEAK() annotations and ultimately remove the macro itself.

- Patch 23 works around a bug in the leak sanitizer itself.

- Patches 24 and 25 drop annotations where leak-free tests pass with the leak sanitizer.

- Patches 26 and 27 unconditionally enable leak checking in all newly added tests and then drop the TEST_PASSES_SANITIZE_LEAK annotation.

So once this series lands, the expectation is that any newly added test needs to be leak free by default. We still have an escape hatch in the form of the SANITIZE_LEAK prerequisite, but patch authors are expected to provide good arguments why their test cannot be made leak free.

Changes in v2:

- Some fixes to code formatting.

- Simplify the memory leak fixes in "help.c".

- Split out the removal of UNLEAK() into its own commit.

Link to v1: https://lore.kernel.org/r/[email protected]

Thanks!

Patrick

To: [email protected]
Cc: Rubén Justo <[email protected]>

Patrick Steinhardt (27):
builtin/blame: fix leaking blame entries with --incremental
bisect: fix leaking good/bad terms when reading multipe times
bisect: fix leaking string in handle_bad_merge_base()
bisect: fix leaking current_bad_oid
bisect: fix multiple leaks in bisect_next_all()
bisect: fix leaking commit list items in check_merge_base()
bisect: fix various cases where we leak commit list items
line-log: fix leak when rewriting commit parents
strvec: introduce new strvec_splice() function
git: refactor alias handling to use a struct strvec
git: refactor builtin handling to use a struct strvec
split-index: fix memory leak in move_cache_to_base_index() builtin/sparse-checkout: fix leaking sanitized patterns
help: refactor to not use globals for reading config
help: fix leaking struct cmdnames
help: fix leaking return value from help_unknown_cmd() builtin/help: fix leaks in check_git_cmd() builtin/init-db: fix leaking directory paths builtin/branch: fix leaking sorting options t/helper: fix leaking commit graph in "read-graph" subcommand
global: drop UNLEAK() annotation
git-compat-util: drop now-unused UNLEAK() macro
t5601: work around leak sanitizer issue
t: mark some tests as leak free
t: remove unneeded !SANITIZE_LEAK prerequisites
test-lib: unconditionally enable leak checking
t: remove TEST_PASSES_SANITIZE_LEAK annotations

 bisect.c                                           |  61 +++++++---
 bisect.h                                           |   2 +-
 blame.c                                            |   1 +
 blame.h                                            |   2 +-
 builtin/blame.c                                    |  12 +-
 builtin/branch.c                                   |  33 ++++--
 builtin/clone.c                                    |   1 -
 builtin/diff.c                                     |   1 -
 builtin/help.c                                     |  13 ++-
 builtin/init-db.c                                  |  34 +++---
 builtin/sparse-checkout.c                          |  61 ++++++----
 ci/lib.sh                                          |   1 -
 git-compat-util.h                                  |  20 ----
 git.c                                              | 124 +++++++++++----------
 help.c                                             |  58 +++++-----
 help.h                                             |   2 +-
 line-log.c                                         |   1 +
 revision.c                                         |   4 +-
 split-index.c                                      |   6 +-
 strvec.c                                           |  19 ++++
 strvec.h                                           |   9 ++
 t/README                                           |  21 ----
 t/helper/test-read-graph.c                         |   3 +-
 t/lib-git-svn.sh                                   |   4 -
 t/t0001-init.sh                                    |   1 -
 t/t0002-gitfile.sh                                 |   1 -
 t/t0003-attributes.sh                              |   1 -
 t/t0004-unwritable.sh                              |   1 -
 t/t0005-signals.sh                                 |   1 -
 t/t0006-date.sh                                    |   1 -
 t/t0007-git-var.sh                                 |   1 -
 t/t0008-ignores.sh                                 |   1 -
 t/t0010-racy-git.sh                                |   1 -
 t/t0012-help.sh                                    |   1 -
 t/t0013-sha1dc.sh                                  |   1 -
 t/t0017-env-helper.sh                              |   1 -
 t/t0018-advice.sh                                  |   1 -
 t/t0019-json-writer.sh                             |   1 -
 t/t0020-crlf.sh                                    |   1 -
 t/t0021-conversion.sh                              |   1 -
 t/t0022-crlf-rename.sh                             |   1 -
 t/t0023-crlf-am.sh                                 |   1 -
 t/t0024-crlf-archive.sh                            |   1 -
 t/t0025-crlf-renormalize.sh                        |   1 -
 t/t0026-eol-config.sh                              |   1 -
 t/t0027-auto-crlf.sh                               |   1 -
 t/t0028-working-tree-encoding.sh                   |   1 -
 t/t0029-core-unsetenvvars.sh                       |   1 -
 t/t0030-stripspace.sh                              |   1 -
 t/t0033-safe-directory.sh                          |   1 -
 t/t0035-safe-bare-repository.sh                    |   1 -
 t/t0040-parse-options.sh                           |   1 -
 t/t0041-usage.sh                                   |   1 -
 t/t0050-filesystem.sh                              |   1 -
 t/t0052-simple-ipc.sh                              |   1 -
 t/t0055-beyond-symlinks.sh                         |   1 -
 t/t0056-git-C.sh                                   |   1 -
 t/t0060-path-utils.sh                              |   1 -
 t/t0061-run-command.sh                             |   1 -
 t/t0062-revision-walking.sh                        |   1 -
 t/t0063-string-list.sh                             |   1 -
 t/t0066-dir-iterator.sh                            |   1 -
 t/t0067-parse_pathspec_file.sh                     |   1 -
 t/t0068-for-each-repo.sh                           |   1 -
 t/t0070-fundamental.sh                             |   1 -
 t/t0071-sort.sh                                    |   1 -
 t/t0080-unit-test-output.sh                        |   1 -
 t/t0081-find-pack.sh                               |   1 -
 t/t0090-cache-tree.sh                              |   1 -
 t/t0091-bugreport.sh                               |   1 -
 t/t0092-diagnose.sh                                |   1 -
 t/t0095-bloom.sh                                   |   3 +-
 t/t0100-previous.sh                                |   1 -
 t/t0101-at-syntax.sh                               |   1 -
 t/t0200-gettext-basic.sh                           |   1 -
 t/t0201-gettext-fallbacks.sh                       |   1 -
 t/t0202-gettext-perl.sh                            |   1 -
 t/t0203-gettext-setlocale-sanity.sh                |   1 -
 t/t0204-gettext-reencode-sanity.sh                 |   1 -
 t/t0210-trace2-normal.sh                           |   1 -
 t/t0211-trace2-perf.sh                             |   1 -
 t/t0212-trace2-event.sh                            |   1 -
 t/t0300-credentials.sh                             |   1 -
 t/t0301-credential-cache.sh                        |   1 -
 t/t0302-credential-store.sh                        |   1 -
 t/t0303-credential-external.sh                     |   1 -
 t/t0410-partial-clone.sh                           |   1 -
 t/t0411-clone-from-partial.sh                      |   1 -
 t/t0450-txt-doc-vs-help.sh                         |   1 -
 t/t0500-progress-display.sh                        |   1 -
 t/t0600-reffiles-backend.sh                        |   1 -
 t/t0601-reffiles-pack-refs.sh                      |   1 -
 t/t0602-reffiles-fsck.sh                           |   1 -
 t/t0610-reftable-basics.sh                         |   1 -
 t/t0611-reftable-httpd.sh                          |   1 -
 t/t0612-reftable-jgit-compatibility.sh             |   1 -
 t/t0613-reftable-write-options.sh                  |   1 -
 t/t1000-read-tree-m-3way.sh                        |   1 -
 t/t1001-read-tree-m-2way.sh                        |   1 -
 t/t1002-read-tree-m-u-2way.sh                      |   1 -
 t/t1003-read-tree-prefix.sh                        |   1 -
 t/t1004-read-tree-m-u-wf.sh                        |   1 -
 t/t1005-read-tree-reset.sh                         |   1 -
 t/t1006-cat-file.sh                                |   1 -
 t/t1007-hash-object.sh                             |   1 -
 t/t1008-read-tree-overlay.sh                       |   1 -
 t/t1009-read-tree-new-index.sh                     |   1 -
 t/t1010-mktree.sh                                  |   1 -
 t/t1011-read-tree-sparse-checkout.sh               |   1 -
 t/t1012-read-tree-df.sh                            |   1 -
 t/t1013-read-tree-submodule.sh                     |   1 -
 t/t1014-read-tree-confusing.sh                     |   1 -
 t/t1015-read-index-unmerged.sh                     |   1 -
 t/t1016-compatObjectFormat.sh                      |   1 -
 t/t1020-subdirectory.sh                            |   1 -
 t/t1021-rerere-in-workdir.sh                       |   1 -
 t/t1022-read-tree-partial-clone.sh                 |   1 -
 t/t1050-large.sh                                   |   1 -
 t/t1051-large-conversion.sh                        |   1 -
 t/t1060-object-corruption.sh                       |   1 -
 t/t1090-sparse-checkout-scope.sh                   |   1 -
 t/t1091-sparse-checkout-builtin.sh                 |   1 -
 t/t1092-sparse-checkout-compatibility.sh           |   1 -
 t/t1100-commit-tree-options.sh                     |   1 -
 t/t1300-config.sh                                  |   1 -
 t/t1301-shared-repo.sh                             |   1 -
 t/t1302-repo-version.sh                            |   1 -
 t/t1303-wacky-config.sh                            |   1 -
 t/t1304-default-acl.sh                             |   1 -
 t/t1305-config-include.sh                          |   1 -
 t/t1306-xdg-files.sh                               |   1 -
 t/t1307-config-blob.sh                             |   1 -
 t/t1308-config-set.sh                              |   1 -
 t/t1309-early-config.sh                            |   1 -
 t/t1310-config-default.sh                          |   1 -
 t/t1350-config-hooks-path.sh                       |   1 -
 t/t1400-update-ref.sh                              |   1 -
 t/t1401-symbolic-ref.sh                            |   1 -
 t/t1402-check-ref-format.sh                        |   1 -
 t/t1403-show-ref.sh                                |   1 -
 t/t1404-update-ref-errors.sh                       |   1 -
 t/t1405-main-ref-store.sh                          |   1 -
 t/t1406-submodule-ref-store.sh                     |   1 -
 t/t1407-worktree-ref-store.sh                      |   1 -
 t/t1408-packed-refs.sh                             |   1 -
 t/t1409-avoid-packing-refs.sh                      |   1 -
 t/t1410-reflog.sh                                  |   1 -
 t/t1411-reflog-show.sh                             |   1 -
 t/t1412-reflog-loop.sh                             |   1 -
 t/t1413-reflog-detach.sh                           |   1 -
 t/t1414-reflog-walk.sh                             |   1 -
 t/t1415-worktree-refs.sh                           |   1 -
 t/t1416-ref-transaction-hooks.sh                   |   1 -
 t/t1417-reflog-updateref.sh                        |   1 -
 t/t1418-reflog-exists.sh                           |   1 -
 t/t1419-exclude-refs.sh                            |   1 -
 t/t1420-lost-found.sh                              |   1 -
 t/t1430-bad-ref-name.sh                            |   1 -
 t/t1450-fsck.sh                                    |   1 -
 t/t1451-fsck-buffer.sh                             |   1 -
 t/t1460-refs-migrate.sh                            |   1 -
 t/t1500-rev-parse.sh                               |   1 -
 t/t1501-work-tree.sh                               |   1 -
 t/t1502-rev-parse-parseopt.sh                      |   1 -
 t/t1503-rev-parse-verify.sh                        |   1 -
 t/t1504-ceiling-dirs.sh                            |   1 -
 t/t1505-rev-parse-last.sh                          |   1 -
 t/t1506-rev-parse-diagnosis.sh                     |   1 -
 t/t1507-rev-parse-upstream.sh                      |   1 -
 t/t1508-at-combinations.sh                         |   1 -
 t/t1510-repo-setup.sh                              |   1 -
 t/t1511-rev-parse-caret.sh                         |   1 -
 t/t1512-rev-parse-disambiguation.sh                |   1 -
 t/t1513-rev-parse-prefix.sh                        |   1 -
 t/t1514-rev-parse-push.sh                          |   1 -
 t/t1515-rev-parse-outside-repo.sh                  |   1 -
 t/t1517-outside-repo.sh                            |   1 -
 t/t1600-index.sh                                   |   1 -
 t/t1601-index-bogus.sh                             |   1 -
 t/t1701-racy-split-index.sh                        |   1 -
 t/t1800-hook.sh                                    |   1 -
 t/t2000-conflict-when-checking-files-out.sh        |   1 -
 t/t2002-checkout-cache-u.sh                        |   1 -
 t/t2003-checkout-cache-mkdir.sh                    |   1 -
 t/t2004-checkout-cache-temp.sh                     |   1 -
 t/t2005-checkout-index-symlinks.sh                 |   1 -
 t/t2006-checkout-index-basic.sh                    |   1 -
 t/t2007-checkout-symlink.sh                        |   1 -
 t/t2008-checkout-subdir.sh                         |   1 -
 t/t2009-checkout-statinfo.sh                       |   1 -
 t/t2010-checkout-ambiguous.sh                      |   1 -
 t/t2011-checkout-invalid-head.sh                   |   1 -
 t/t2012-checkout-last.sh                           |   1 -
 t/t2013-checkout-submodule.sh                      |   1 -
 t/t2014-checkout-switch.sh                         |   1 -
 t/t2015-checkout-unborn.sh                         |   1 -
 t/t2016-checkout-patch.sh                          |   1 -
 t/t2017-checkout-orphan.sh                         |   1 -
 t/t2018-checkout-branch.sh                         |   1 -
 t/t2019-checkout-ambiguous-ref.sh                  |   1 -
 t/t2020-checkout-detach.sh                         |   1 -
 t/t2021-checkout-overwrite.sh                      |   1 -
 t/t2022-checkout-paths.sh                          |   1 -
 t/t2023-checkout-m.sh                              |   1 -
 t/t2024-checkout-dwim.sh                           |   1 -
 t/t2025-checkout-no-overlay.sh                     |   1 -
 t/t2026-checkout-pathspec-file.sh                  |   1 -
 t/t2027-checkout-track.sh                          |   1 -
 t/t2030-unresolve-info.sh                          |   1 -
 t/t2050-git-dir-relative.sh                        |   1 -
 t/t2060-switch.sh                                  |   1 -
 t/t2070-restore.sh                                 |   1 -
 t/t2071-restore-patch.sh                           |   1 -
 t/t2072-restore-pathspec-file.sh                   |   1 -
 t/t2080-parallel-checkout-basics.sh                |   1 -
 t/t2081-parallel-checkout-collisions.sh            |   1 -
 t/t2082-parallel-checkout-attributes.sh            |   1 -
 t/t2100-update-cache-badpath.sh                    |   1 -
 t/t2101-update-index-reupdate.sh                   |   1 -
 t/t2102-update-index-symlinks.sh                   |   1 -
 t/t2103-update-index-ignore-missing.sh             |   1 -
 t/t2104-update-index-skip-worktree.sh              |   1 -
 t/t2105-update-index-gitfile.sh                    |   1 -
 t/t2106-update-index-assume-unchanged.sh           |   1 -
 t/t2107-update-index-basic.sh                      |   1 -
 t/t2108-update-index-refresh-racy.sh               |   1 -
 t/t2200-add-update.sh                              |   1 -
 t/t2201-add-update-typechange.sh                   |   1 -
 t/t2202-add-addremove.sh                           |   1 -
 t/t2203-add-intent.sh                              |   1 -
 t/t2204-add-ignored.sh                             |   1 -
 t/t2205-add-worktree-config.sh                     |   1 -
 t/t2300-cd-to-toplevel.sh                          |   1 -
 t/t2400-worktree-add.sh                            |   1 -
 t/t2401-worktree-prune.sh                          |   1 -
 t/t2402-worktree-list.sh                           |   1 -
 t/t2403-worktree-move.sh                           |   1 -
 t/t2404-worktree-config.sh                         |   1 -
 t/t2405-worktree-submodule.sh                      |   1 -
 t/t2406-worktree-repair.sh                         |   1 -
 t/t2407-worktree-heads.sh                          |  17 ++-
 t/t2408-worktree-relative.sh                       |   1 -
 t/t2500-untracked-overwriting.sh                   |   1 -
 t/t2501-cwd-empty.sh                               |   1 -
 t/t3000-ls-files-others.sh                         |   1 -
 t/t3001-ls-files-others-exclude.sh                 |   1 -
 t/t3002-ls-files-dashpath.sh                       |   1 -
 t/t3003-ls-files-exclude.sh                        |   1 -
 t/t3004-ls-files-basic.sh                          |   1 -
 t/t3005-ls-files-relative.sh                       |   1 -
 t/t3006-ls-files-long.sh                           |   1 -
 t/t3007-ls-files-recurse-submodules.sh             |   1 -
 t/t3008-ls-files-lazy-init-name-hash.sh            |   1 -
 t/t3009-ls-files-others-nonsubmodule.sh            |   1 -
 t/t3010-ls-files-killed-modified.sh                |   1 -
 t/t3011-common-prefixes-and-directory-traversal.sh |   1 -
 t/t3012-ls-files-dedup.sh                          |   1 -
 t/t3013-ls-files-format.sh                         |   1 -
 t/t3020-ls-files-error-unmatch.sh                  |   1 -
 t/t3040-subprojects-basic.sh                       |   1 -
 t/t3050-subprojects-fetch.sh                       |   1 -
 t/t3060-ls-files-with-tree.sh                      |   1 -
 t/t3070-wildmatch.sh                               |   1 -
 t/t3100-ls-tree-restrict.sh                        |   1 -
 t/t3101-ls-tree-dirname.sh                         |   1 -
 t/t3102-ls-tree-wildcards.sh                       |   1 -
 t/t3103-ls-tree-misc.sh                            |   1 -
 t/t3104-ls-tree-format.sh                          |   1 -
 t/t3105-ls-tree-output.sh                          |   1 -
 t/t3200-branch.sh                                  |   1 -
 t/t3201-branch-contains.sh                         |   1 -
 t/t3202-show-branch.sh                             |   1 -
 t/t3203-branch-output.sh                           |   1 -
 t/t3204-branch-name-interpretation.sh              |   1 -
 t/t3205-branch-color.sh                            |   1 -
 t/t3206-range-diff.sh                              |   1 -
 t/t3207-branch-submodule.sh                        |   1 -
 t/t3211-peel-ref.sh                                |   1 -
 t/t3300-funny-names.sh                             |   1 -
 t/t3301-notes.sh                                   |   1 -
 t/t3302-notes-index-expensive.sh                   |   1 -
 t/t3303-notes-subtrees.sh                          |   1 -
 t/t3304-notes-mixed.sh                             |   1 -
 t/t3305-notes-fanout.sh                            |   1 -
 t/t3306-notes-prune.sh                             |   1 -
 t/t3307-notes-man.sh                               |   1 -
 t/t3308-notes-merge.sh                             |   1 -
 t/t3309-notes-merge-auto-resolve.sh                |   1 -
 t/t3310-notes-merge-manual-resolve.sh              |   1 -
 t/t3311-notes-merge-fanout.sh                      |   1 -
 t/t3320-notes-merge-worktrees.sh                   |   1 -
 t/t3321-notes-stripspace.sh                        |   1 -
 t/t3400-rebase.sh                                  |   1 -
 t/t3401-rebase-and-am-rename.sh                    |   1 -
 t/t3402-rebase-merge.sh                            |   1 -
 t/t3403-rebase-skip.sh                             |   1 -
 t/t3404-rebase-interactive.sh                      |   1 -
 t/t3405-rebase-malformed.sh                        |   1 -
 t/t3406-rebase-message.sh                          |   1 -
 t/t3407-rebase-abort.sh                            |   1 -
 t/t3408-rebase-multi-line.sh                       |   1 -
 t/t3409-rebase-environ.sh                          |   1 -
 t/t3412-rebase-root.sh                             |   1 -
 t/t3413-rebase-hook.sh                             |   1 -
 t/t3415-rebase-autosquash.sh                       |   1 -
 t/t3416-rebase-onto-threedots.sh                   |   1 -
 t/t3417-rebase-whitespace-fix.sh                   |   1 -
 t/t3418-rebase-continue.sh                         |   1 -
 t/t3419-rebase-patch-id.sh                         |   1 -
 t/t3420-rebase-autostash.sh                        |   1 -
 t/t3421-rebase-topology-linear.sh                  |   1 -
 t/t3422-rebase-incompatible-options.sh             |   1 -
 t/t3423-rebase-reword.sh                           |   1 -
 t/t3424-rebase-empty.sh                            |   1 -
 t/t3425-rebase-topology-merges.sh                  |   1 -
 t/t3426-rebase-submodule.sh                        |   1 -
 t/t3427-rebase-subtree.sh                          |   1 -
 t/t3428-rebase-signoff.sh                          |   1 -
 t/t3429-rebase-edit-todo.sh                        |   1 -
 t/t3430-rebase-merges.sh                           |   1 -
 t/t3431-rebase-fork-point.sh                       |   1 -
 t/t3432-rebase-fast-forward.sh                     |   1 -
 t/t3433-rebase-across-mode-change.sh               |   1 -
 t/t3434-rebase-i18n.sh                             |   1 -
 t/t3435-rebase-gpg-sign.sh                         |   1 -
 t/t3436-rebase-more-options.sh                     |   1 -
 t/t3437-rebase-fixup-options.sh                    |   1 -
 t/t3438-rebase-broken-files.sh                     |   1 -
 t/t3500-cherry.sh                                  |   1 -
 t/t3501-revert-cherry-pick.sh                      |   1 -
 t/t3502-cherry-pick-merge.sh                       |   1 -
 t/t3503-cherry-pick-root.sh                        |   1 -
 t/t3504-cherry-pick-rerere.sh                      |   1 -
 t/t3505-cherry-pick-empty.sh                       |   1 -
 t/t3506-cherry-pick-ff.sh                          |   1 -
 t/t3507-cherry-pick-conflict.sh                    |   1 -
 t/t3508-cherry-pick-many-commits.sh                |   1 -
 t/t3509-cherry-pick-merge-df.sh                    |   1 -
 t/t3510-cherry-pick-sequence.sh                    |   1 -
 t/t3511-cherry-pick-x.sh                           |   1 -
 t/t3512-cherry-pick-submodule.sh                   |   1 -
 t/t3513-revert-submodule.sh                        |   1 -
 t/t3514-cherry-pick-revert-gpg.sh                  |   1 -
 t/t3600-rm.sh                                      |   1 -
 t/t3601-rm-pathspec-file.sh                        |   1 -
 t/t3602-rm-sparse-checkout.sh                      |   1 -
 t/t3650-replay-basics.sh                           |   1 -
 t/t3700-add.sh                                     |   1 -
 t/t3701-add-interactive.sh                         |   1 -
 t/t3702-add-edit.sh                                |   1 -
 t/t3703-add-magic-pathspec.sh                      |   1 -
 t/t3704-add-pathspec-file.sh                       |   1 -
 t/t3705-add-sparse-checkout.sh                     |   1 -
 t/t3800-mktag.sh                                   |   1 -
 t/t3900-i18n-commit.sh                             |   1 -
 t/t3901-i18n-patch.sh                              |   1 -
 t/t3902-quoted.sh                                  |   1 -
 t/t3903-stash.sh                                   |   1 -
 t/t3904-stash-patch.sh                             |   1 -
 t/t3905-stash-include-untracked.sh                 |   1 -
 t/t3906-stash-submodule.sh                         |   1 -
 t/t3907-stash-show-config.sh                       |   1 -
 t/t3908-stash-in-worktree.sh                       |   1 -
 t/t3909-stash-pathspec-file.sh                     |   1 -
 t/t3920-crlf-messages.sh                           |   1 -
 t/t4000-diff-format.sh                             |   1 -
 t/t4001-diff-rename.sh                             |   1 -
 t/t4002-diff-basic.sh                              |   1 -
 t/t4003-diff-rename-1.sh                           |   1 -
 t/t4004-diff-rename-symlink.sh                     |   1 -
 t/t4005-diff-rename-2.sh                           |   1 -
 t/t4006-diff-mode.sh                               |   1 -
 t/t4007-rename-3.sh                                |   1 -
 t/t4008-diff-break-rewrite.sh                      |   1 -
 t/t4009-diff-rename-4.sh                           |   1 -
 t/t4010-diff-pathspec.sh                           |   1 -
 t/t4011-diff-symlink.sh                            |   1 -
 t/t4012-diff-binary.sh                             |   1 -
 t/t4013-diff-various.sh                            |   1 -
 t/t4014-format-patch.sh                            |   1 -
 t/t4015-diff-whitespace.sh                         |   1 -
 t/t4016-diff-quote.sh                              |   1 -
 t/t4017-diff-retval.sh                             |   1 -
 t/t4018-diff-funcname.sh                           |   1 -
 t/t4019-diff-wserror.sh                            |   1 -
 t/t4020-diff-external.sh                           |   5 +-
 t/t4021-format-patch-numbered.sh                   |   1 -
 t/t4022-diff-rewrite.sh                            |   1 -
 t/t4023-diff-rename-typechange.sh                  |   1 -
 t/t4024-diff-optimize-common.sh                    |   1 -
 t/t4025-hunk-header.sh                             |   1 -
 t/t4026-color.sh                                   |   1 -
 t/t4027-diff-submodule.sh                          |   1 -
 t/t4028-format-patch-mime-headers.sh               |   1 -
 t/t4029-diff-trailing-space.sh                     |   1 -
 t/t4030-diff-textconv.sh                           |   1 -
 t/t4031-diff-rewrite-binary.sh                     |   1 -
 t/t4032-diff-inter-hunk-context.sh                 |   1 -
 t/t4033-diff-patience.sh                           |   1 -
 t/t4034-diff-words.sh                              |   1 -
 t/t4035-diff-quiet.sh                              |   1 -
 t/t4036-format-patch-signer-mime.sh                |   1 -
 t/t4037-diff-r-t-dirs.sh                           |   1 -
 t/t4038-diff-combined.sh                           |   1 -
 t/t4039-diff-assume-unchanged.sh                   |   1 -
 t/t4040-whitespace-status.sh                       |   1 -
 t/t4041-diff-submodule-option.sh                   |   1 -
 t/t4042-diff-textconv-caching.sh                   |   1 -
 t/t4043-diff-rename-binary.sh                      |   1 -
 t/t4044-diff-index-unique-abbrev.sh                |   1 -
 t/t4045-diff-relative.sh                           |   1 -
 t/t4046-diff-unmerged.sh                           |   1 -
 t/t4047-diff-dirstat.sh                            |   1 -
 t/t4048-diff-combined-binary.sh                    |   1 -
 t/t4049-diff-stat-count.sh                         |   1 -
 t/t4050-diff-histogram.sh                          |   1 -
 t/t4051-diff-function-context.sh                   |   1 -
 t/t4052-stat-output.sh                             |   1 -
 t/t4053-diff-no-index.sh                           |   1 -
 t/t4054-diff-bogus-tree.sh                         |   1 -
 t/t4055-diff-context.sh                            |   1 -
 t/t4056-diff-order.sh                              |   1 -
 t/t4057-diff-combined-paths.sh                     |   1 -
 t/t4058-diff-duplicates.sh                         |   1 -
 t/t4059-diff-submodule-not-initialized.sh          |   1 -
 t/t4060-diff-submodule-option-diff-format.sh       |   1 -
 t/t4061-diff-indent.sh                             |   1 -
 t/t4062-diff-pickaxe.sh                            |   1 -
 t/t4063-diff-blobs.sh                              |   1 -
 t/t4064-diff-oidfind.sh                            |   1 -
 t/t4065-diff-anchored.sh                           |   1 -
 t/t4066-diff-emit-delay.sh                         |   1 -
 t/t4067-diff-partial-clone.sh                      |   1 -
 t/t4068-diff-symmetric-merge-base.sh               |   1 -
 t/t4069-remerge-diff.sh                            |   1 -
 t/t4100-apply-stat.sh                              |   1 -
 t/t4101-apply-nonl.sh                              |   1 -
 t/t4102-apply-rename.sh                            |   1 -
 t/t4103-apply-binary.sh                            |   1 -
 t/t4104-apply-boundary.sh                          |   1 -
 t/t4105-apply-fuzz.sh                              |   1 -
 t/t4106-apply-stdin.sh                             |   1 -
 t/t4107-apply-ignore-whitespace.sh                 |   1 -
 t/t4108-apply-threeway.sh                          |   1 -
 t/t4109-apply-multifrag.sh                         |   1 -
 t/t4110-apply-scan.sh                              |   1 -
 t/t4111-apply-subdir.sh                            |   1 -
 t/t4112-apply-renames.sh                           |   1 -
 t/t4113-apply-ending.sh                            |   1 -
 t/t4114-apply-typechange.sh                        |   1 -
 t/t4115-apply-symlink.sh                           |   1 -
 t/t4116-apply-reverse.sh                           |   1 -
 t/t4117-apply-reject.sh                            |   1 -
 t/t4118-apply-empty-context.sh                     |   1 -
 t/t4119-apply-config.sh                            |   1 -
 t/t4120-apply-popt.sh                              |   1 -
 t/t4121-apply-diffs.sh                             |   1 -
 t/t4122-apply-symlink-inside.sh                    |   1 -
 t/t4123-apply-shrink.sh                            |   1 -
 t/t4124-apply-ws-rule.sh                           |   1 -
 t/t4125-apply-ws-fuzz.sh                           |   1 -
 t/t4126-apply-empty.sh                             |   1 -
 t/t4127-apply-same-fn.sh                           |   1 -
 t/t4128-apply-root.sh                              |   1 -
 t/t4129-apply-samemode.sh                          |   1 -
 t/t4130-apply-criss-cross-rename.sh                |   1 -
 t/t4131-apply-fake-ancestor.sh                     |   1 -
 t/t4132-apply-removal.sh                           |   1 -
 t/t4133-apply-filenames.sh                         |   1 -
 t/t4134-apply-submodule.sh                         |   1 -
 t/t4135-apply-weird-filenames.sh                   |   1 -
 t/t4136-apply-check.sh                             |   1 -
 t/t4137-apply-submodule.sh                         |   1 -
 t/t4138-apply-ws-expansion.sh                      |   1 -
 t/t4139-apply-escape.sh                            |   1 -
 t/t4140-apply-ita.sh                               |   1 -
 t/t4141-apply-too-large.sh                         |   1 -
 t/t4150-am.sh                                      |   1 -
 t/t4151-am-abort.sh                                |   1 -
 t/t4152-am-subjects.sh                             |   1 -
 t/t4153-am-resume-override-opts.sh                 |   1 -
 t/t4200-rerere.sh                                  |   1 -
 t/t4201-shortlog.sh                                |   1 -
 t/t4202-log.sh                                     |   1 -
 t/t4203-mailmap.sh                                 |   1 -
 t/t4204-patch-id.sh                                |   1 -
 t/t4205-log-pretty-formats.sh                      |   1 -
 t/t4206-log-follow-harder-copies.sh                |   1 -
 t/t4207-log-decoration-colors.sh                   |   1 -
 t/t4208-log-magic-pathspec.sh                      |   1 -
 t/t4209-log-pickaxe.sh                             |   1 -
 t/t4210-log-i18n.sh                                |   1 -
 t/t4212-log-corrupt.sh                             |   1 -
 t/t4213-log-tabexpand.sh                           |   1 -
 t/t4214-log-graph-octopus.sh                       |   1 -
 t/t4215-log-skewed-merges.sh                       |   1 -
 t/t4216-log-bloom.sh                               |   1 -
 t/t4217-log-limit.sh                               |   1 -
 t/t4252-am-options.sh                              |   1 -
 t/t4253-am-keep-cr-dos.sh                          |   1 -
 t/t4254-am-corrupt.sh                              |   1 -
 t/t4255-am-submodule.sh                            |   1 -
 t/t4256-am-format-flowed.sh                        |   1 -
 t/t4257-am-interactive.sh                          |   1 -
 t/t4258-am-quoted-cr.sh                            |   1 -
 t/t4300-merge-tree.sh                              |   1 -
 t/t4301-merge-tree-write-tree.sh                   |   1 -
 t/t5000-tar-tree.sh                                |   1 -
 t/t5001-archive-attr.sh                            |   1 -
 t/t5002-archive-attr-pattern.sh                    |   1 -
 t/t5003-archive-zip.sh                             |   1 -
 t/t5004-archive-corner-cases.sh                    |   1 -
 t/t5100-mailinfo.sh                                |   1 -
 t/t5150-request-pull.sh                            |   1 -
 t/t5200-update-server-info.sh                      |   1 -
 t/t5300-pack-object.sh                             |   1 -
 t/t5301-sliding-window.sh                          |   1 -
 t/t5302-pack-index.sh                              |   1 -
 t/t5303-pack-corruption-resilience.sh              |   1 -
 t/t5304-prune.sh                                   |   1 -
 t/t5305-include-tag.sh                             |   1 -
 t/t5306-pack-nobase.sh                             |   1 -
 t/t5307-pack-missing-commit.sh                     |   1 -
 t/t5308-pack-detect-duplicates.sh                  |   1 -
 t/t5309-pack-delta-cycles.sh                       |   1 -
 t/t5310-pack-bitmaps.sh                            |   1 -
 t/t5311-pack-bitmaps-shallow.sh                    |   1 -
 t/t5312-prune-corruption.sh                        |   1 -
 t/t5313-pack-bounds-checks.sh                      |   1 -
 t/t5314-pack-cycle-detection.sh                    |   1 -
 t/t5315-pack-objects-compression.sh                |   1 -
 t/t5316-pack-delta-depth.sh                        |   1 -
 t/t5317-pack-objects-filter-objects.sh             |   1 -
 t/t5318-commit-graph.sh                            |   1 -
 t/t5319-multi-pack-index.sh                        |   1 -
 t/t5320-delta-islands.sh                           |   1 -
 t/t5321-pack-large-objects.sh                      |   1 -
 t/t5322-pack-objects-sparse.sh                     |   1 -
 t/t5323-pack-redundant.sh                          |   1 -
 t/t5324-split-commit-graph.sh                      |   1 -
 t/t5325-reverse-index.sh                           |   1 -
 t/t5326-multi-pack-bitmaps.sh                      |   1 -
 t/t5327-multi-pack-bitmaps-rev.sh                  |   1 -
 t/t5328-commit-graph-64bit-time.sh                 |   1 -
 t/t5329-pack-objects-cruft.sh                      |   1 -
 t/t5330-no-lazy-fetch-with-commit-graph.sh         |   1 -
 t/t5331-pack-objects-stdin.sh                      |   1 -
 t/t5332-multi-pack-reuse.sh                        |   1 -
 t/t5333-pseudo-merge-bitmaps.sh                    |   1 -
 t/t5334-incremental-multi-pack-index.sh            |   1 -
 t/t5351-unpack-large-objects.sh                    |   1 -
 t/t5400-send-pack.sh                               |   1 -
 t/t5401-update-hooks.sh                            |   1 -
 t/t5402-post-merge-hook.sh                         |   1 -
 t/t5403-post-checkout-hook.sh                      |   1 -
 t/t5404-tracking-branches.sh                       |   1 -
 t/t5405-send-pack-rewind.sh                        |   1 -
 t/t5406-remote-rejects.sh                          |   1 -
 t/t5407-post-rewrite-hook.sh                       |   1 -
 t/t5408-send-pack-stdin.sh                         |   1 -
 t/t5409-colorize-remote-messages.sh                |   1 -
 t/t5410-receive-pack-alternates.sh                 |   1 -
 t/t5411-proc-receive-hook.sh                       |   1 -
 t/t5500-fetch-pack.sh                              |   1 -
 t/t5501-fetch-push-alternates.sh                   |   1 -
 t/t5502-quickfetch.sh                              |   1 -
 t/t5503-tagfollow.sh                               |   1 -
 t/t5504-fetch-receive-strict.sh                    |   1 -
 t/t5505-remote.sh                                  |   1 -
 t/t5506-remote-groups.sh                           |   1 -
 t/t5507-remote-environment.sh                      |   1 -
 t/t5509-fetch-push-namespaces.sh                   |   1 -
 t/t5510-fetch.sh                                   |   1 -
 t/t5511-refspec.sh                                 |   1 -
 t/t5512-ls-remote.sh                               |   1 -
 t/t5513-fetch-track.sh                             |   1 -
 t/t5514-fetch-multiple.sh                          |   1 -
 t/t5515-fetch-merge-logic.sh                       |   1 -
 t/t5516-fetch-push.sh                              |   1 -
 t/t5517-push-mirror.sh                             |   1 -
 t/t5518-fetch-exit-status.sh                       |   1 -
 t/t5519-push-alternates.sh                         |   1 -
 t/t5520-pull.sh                                    |   1 -
 t/t5521-pull-options.sh                            |   1 -
 t/t5522-pull-symlink.sh                            |   1 -
 t/t5523-push-upstream.sh                           |   1 -
 t/t5524-pull-msg.sh                                |   1 -
 t/t5525-fetch-tagopt.sh                            |   1 -
 t/t5526-fetch-submodules.sh                        |   1 -
 t/t5527-fetch-odd-refs.sh                          |   1 -
 t/t5528-push-default.sh                            |   1 -
 t/t5529-push-errors.sh                             |   1 -
 t/t5530-upload-pack-error.sh                       |   1 -
 t/t5531-deep-submodule-push.sh                     |   1 -
 t/t5532-fetch-proxy.sh                             |   1 -
 t/t5533-push-cas.sh                                |   1 -
 t/t5534-push-signed.sh                             |   1 -
 t/t5535-fetch-push-symref.sh                       |   1 -
 t/t5536-fetch-conflicts.sh                         |   1 -
 t/t5537-fetch-shallow.sh                           |   1 -
 t/t5538-push-shallow.sh                            |   1 -
 t/t5539-fetch-http-shallow.sh                      |   1 -
 t/t5540-http-push-webdav.sh                        |   1 -
 t/t5541-http-push-smart.sh                         |   1 -
 t/t5542-push-http-shallow.sh                       |   1 -
 t/t5543-atomic-push.sh                             |   1 -
 t/t5544-pack-objects-hook.sh                       |   1 -
 t/t5545-push-options.sh                            |   1 -
 t/t5546-receive-limits.sh                          |   1 -
 t/t5547-push-quarantine.sh                         |   1 -
 t/t5548-push-porcelain.sh                          |   1 -
 t/t5549-fetch-push-http.sh                         |   1 -
 t/t5550-http-fetch-dumb.sh                         |   1 -
 t/t5551-http-fetch-smart.sh                        |   1 -
 t/t5552-skipping-fetch-negotiator.sh               |   1 -
 t/t5553-set-upstream.sh                            |   1 -
 t/t5554-noop-fetch-negotiator.sh                   |   1 -
 t/t5555-http-smart-common.sh                       |   1 -
 t/t5557-http-get.sh                                |   1 -
 t/t5560-http-backend-noserver.sh                   |   1 -
 t/t5561-http-backend.sh                            |   1 -
 t/t5562-http-backend-content-length.sh             |   1 -
 t/t5563-simple-http-auth.sh                        |   1 -
 t/t5564-http-proxy.sh                              |   1 -
 t/t5570-git-daemon.sh                              |   1 -
 t/t5571-pre-push-hook.sh                           |   1 -
 t/t5572-pull-submodule.sh                          |   1 -
 t/t5573-pull-verify-signatures.sh                  |   1 -
 t/t5574-fetch-output.sh                            |   1 -
 t/t5580-unc-paths.sh                               |   1 -
 t/t5581-http-curl-verbose.sh                       |   1 -
 t/t5582-fetch-negative-refspec.sh                  |   1 -
 t/t5583-push-branches.sh                           |   1 -
 t/t5600-clone-fail-cleanup.sh                      |   1 -
 t/t5601-clone.sh                                   |  26 +++--
 t/t5602-clone-remote-exec.sh                       |   1 -
 t/t5603-clone-dirname.sh                           |   1 -
 t/t5604-clone-reference.sh                         |   1 -
 t/t5605-clone-local.sh                             |   1 -
 t/t5606-clone-options.sh                           |   1 -
 t/t5607-clone-bundle.sh                            |   1 -
 t/t5609-clone-branch.sh                            |   1 -
 t/t5610-clone-detached.sh                          |   1 -
 t/t5611-clone-config.sh                            |   1 -
 t/t5612-clone-refspec.sh                           |   1 -
 t/t5613-info-alternate.sh                          |   1 -
 t/t5614-clone-submodules-shallow.sh                |   1 -
 t/t5615-alternate-env.sh                           |   1 -
 t/t5616-partial-clone.sh                           |   1 -
 t/t5617-clone-submodules-remote.sh                 |   1 -
 t/t5618-alternate-refs.sh                          |   1 -
 t/t5619-clone-local-ambiguous-transport.sh         |   1 -
 t/t5700-protocol-v1.sh                             |   1 -
 t/t5701-git-serve.sh                               |   1 -
 t/t5702-protocol-v2.sh                             |   1 -
 t/t5703-upload-pack-ref-in-want.sh                 |   1 -
 t/t5704-protocol-violations.sh                     |   1 -
 t/t5705-session-id-in-capabilities.sh              |   1 -
 t/t5730-protocol-v2-bundle-uri-file.sh             |   1 -
 t/t5731-protocol-v2-bundle-uri-git.sh              |   1 -
 t/t5732-protocol-v2-bundle-uri-http.sh             |   1 -
 t/t5750-bundle-uri-parse.sh                        |   1 -
 t/t5801-remote-helpers.sh                          |   1 -
 t/t5802-connect-helper.sh                          |   1 -
 t/t5810-proto-disable-local.sh                     |   1 -
 t/t5811-proto-disable-git.sh                       |   1 -
 t/t5812-proto-disable-http.sh                      |   1 -
 t/t5813-proto-disable-ssh.sh                       |   1 -
 t/t5814-proto-disable-ext.sh                       |   1 -
 t/t5815-submodule-protos.sh                        |   1 -
 t/t5900-repo-selection.sh                          |   1 -
 t/t6000-rev-list-misc.sh                           |   1 -
 t/t6001-rev-list-graft.sh                          |   1 -
 t/t6002-rev-list-bisect.sh                         |   1 -
 t/t6003-rev-list-topo-order.sh                     |   1 -
 t/t6004-rev-list-path-optim.sh                     |   1 -
 t/t6005-rev-list-count.sh                          |   1 -
 t/t6006-rev-list-format.sh                         |   1 -
 t/t6007-rev-list-cherry-pick-file.sh               |   1 -
 t/t6008-rev-list-submodule.sh                      |   1 -
 t/t6009-rev-list-parent.sh                         |   1 -
 t/t6010-merge-base.sh                              |   1 -
 t/t6011-rev-list-with-bad-commit.sh                |   1 -
 t/t6012-rev-list-simplify.sh                       |   1 -
 t/t6013-rev-list-reverse-parents.sh                |   1 -
 t/t6014-rev-list-all.sh                            |   1 -
 t/t6016-rev-list-graph-simplify-history.sh         |   1 -
 t/t6017-rev-list-stdin.sh                          |   1 -
 t/t6018-rev-list-glob.sh                           |   1 -
 t/t6019-rev-list-ancestry-path.sh                  |   1 -
 t/t6020-bundle-misc.sh                             |   1 -
 t/t6021-rev-list-exclude-hidden.sh                 |   1 -
 t/t6022-rev-list-missing.sh                        |   1 -
 t/t6040-tracking-info.sh                           |   1 -
 t/t6041-bisect-submodule.sh                        |   1 -
 t/t6050-replace.sh                                 |   1 -
 t/t6060-merge-index.sh                             |   1 -
 t/t6100-rev-list-in-order.sh                       |   1 -
 t/t6101-rev-parse-parents.sh                       |   1 -
 t/t6102-rev-list-unexpected-objects.sh             |   1 -
 t/t6110-rev-list-sparse.sh                         |   1 -
 t/t6111-rev-list-treesame.sh                       |   1 -
 t/t6112-rev-list-filters-objects.sh                |   1 -
 t/t6113-rev-list-bitmap-filters.sh                 |   1 -
 t/t6114-keep-packs.sh                              |   1 -
 t/t6115-rev-list-du.sh                             |   1 -
 t/t6120-describe.sh                                |   1 -
 t/t6130-pathspec-noglob.sh                         |   1 -
 t/t6131-pathspec-icase.sh                          |   1 -
 t/t6132-pathspec-exclude.sh                        |   1 -
 t/t6133-pathspec-rev-dwim.sh                       |   1 -
 t/t6134-pathspec-in-submodule.sh                   |   1 -
 t/t6135-pathspec-with-attrs.sh                     |   1 -
 t/t6136-pathspec-in-bare.sh                        |   1 -
 t/t6200-fmt-merge-msg.sh                           |   1 -
 t/t6300-for-each-ref.sh                            |   1 -
 t/t6301-for-each-ref-errors.sh                     |   1 -
 t/t6302-for-each-ref-filter.sh                     |   1 -
 t/t6400-merge-df.sh                                |   1 -
 t/t6401-merge-criss-cross.sh                       |   1 -
 t/t6402-merge-rename.sh                            |   1 -
 t/t6403-merge-file.sh                              |   1 -
 t/t6404-recursive-merge.sh                         |   1 -
 t/t6405-merge-symlinks.sh                          |   1 -
 t/t6406-merge-attr.sh                              |   1 -
 t/t6407-merge-binary.sh                            |   1 -
 t/t6408-merge-up-to-date.sh                        |   1 -
 t/t6409-merge-subtree.sh                           |   1 -
 t/t6411-merge-filemode.sh                          |   1 -
 t/t6412-merge-large-rename.sh                      |   1 -
 t/t6413-merge-crlf.sh                              |   1 -
 t/t6414-merge-rename-nocruft.sh                    |   1 -
 t/t6415-merge-dir-to-symlink.sh                    |   1 -
 t/t6416-recursive-corner-cases.sh                  |   1 -
 t/t6417-merge-ours-theirs.sh                       |   1 -
 t/t6418-merge-text-auto.sh                         |   1 -
 t/t6421-merge-partial-clone.sh                     |   1 -
 t/t6422-merge-rename-corner-cases.sh               |   1 -
 t/t6423-merge-rename-directories.sh                |   1 -
 t/t6424-merge-unrelated-index-changes.sh           |   1 -
 t/t6425-merge-rename-delete.sh                     |   1 -
 t/t6426-merge-skip-unneeded-updates.sh             |   1 -
 t/t6427-diff3-conflict-markers.sh                  |   1 -
 t/t6428-merge-conflicts-sparse.sh                  |   1 -
 t/t6429-merge-sequence-rename-caching.sh           |   1 -
 t/t6430-merge-recursive.sh                         |   1 -
 t/t6431-merge-criscross.sh                         |   1 -
 t/t6432-merge-recursive-space-options.sh           |   1 -
 t/t6433-merge-toplevel.sh                          |   1 -
 t/t6434-merge-recursive-rename-options.sh          |   1 -
 t/t6435-merge-sparse.sh                            |   1 -
 t/t6436-merge-overwrite.sh                         |   1 -
 t/t6437-submodule-merge.sh                         |   1 -
 t/t6438-submodule-directory-file-conflicts.sh      |   1 -
 t/t6439-merge-co-error-msgs.sh                     |   1 -
 t/t6500-gc.sh                                      |   1 -
 t/t6501-freshen-objects.sh                         |   1 -
 t/t6600-test-reach.sh                              |   1 -
 t/t6700-tree-depth.sh                              |   1 -
 t/t7001-mv.sh                                      |   1 -
 t/t7002-mv-sparse-checkout.sh                      |   1 -
 t/t7003-filter-branch.sh                           |   1 -
 t/t7004-tag.sh                                     |   1 -
 t/t7005-editor.sh                                  |   1 -
 t/t7006-pager.sh                                   |   1 -
 t/t7007-show.sh                                    |   1 -
 t/t7008-filter-branch-null-sha1.sh                 |   1 -
 t/t7010-setup.sh                                   |   1 -
 t/t7011-skip-worktree-reading.sh                   |   1 -
 t/t7012-skip-worktree-writing.sh                   |   1 -
 t/t7030-verify-tag.sh                              |   1 -
 t/t7031-verify-tag-signed-ssh.sh                   |   1 -
 t/t7060-wtstatus.sh                                |   1 -
 t/t7061-wtstatus-ignore.sh                         |   1 -
 t/t7062-wtstatus-ignorecase.sh                     |   1 -
 t/t7063-status-untracked-cache.sh                  |   1 -
 t/t7064-wtstatus-pv2.sh                            |   1 -
 t/t7101-reset-empty-subdirs.sh                     |   1 -
 t/t7102-reset.sh                                   |   1 -
 t/t7103-reset-bare.sh                              |   1 -
 t/t7104-reset-hard.sh                              |   1 -
 t/t7105-reset-patch.sh                             |   1 -
 t/t7106-reset-unborn-branch.sh                     |   1 -
 t/t7107-reset-pathspec-file.sh                     |   1 -
 t/t7110-reset-merge.sh                             |   1 -
 t/t7111-reset-table.sh                             |   1 -
 t/t7112-reset-submodule.sh                         |   1 -
 t/t7113-post-index-change-hook.sh                  |   1 -
 t/t7201-co.sh                                      |   1 -
 t/t7300-clean.sh                                   |   1 -
 t/t7301-clean-interactive.sh                       |   1 -
 t/t7400-submodule-basic.sh                         |   1 -
 t/t7401-submodule-summary.sh                       |   1 -
 t/t7402-submodule-rebase.sh                        |   1 -
 t/t7403-submodule-sync.sh                          |   1 -
 t/t7406-submodule-update.sh                        |   1 -
 t/t7407-submodule-foreach.sh                       |   1 -
 t/t7408-submodule-reference.sh                     |   1 -
 t/t7409-submodule-detached-work-tree.sh            |   1 -
 t/t7411-submodule-config.sh                        |   1 -
 t/t7412-submodule-absorbgitdirs.sh                 |   1 -
 t/t7413-submodule-is-active.sh                     |   1 -
 t/t7414-submodule-mistakes.sh                      |   1 -
 t/t7416-submodule-dash-url.sh                      |   1 -
 t/t7417-submodule-path-url.sh                      |   1 -
 t/t7418-submodule-sparse-gitmodules.sh             |   1 -
 t/t7419-submodule-set-branch.sh                    |   1 -
 t/t7420-submodule-set-url.sh                       |   1 -
 t/t7421-submodule-summary-add.sh                   |   1 -
 t/t7422-submodule-output.sh                        |   1 -
 t/t7423-submodule-symlinks.sh                      |   1 -
 t/t7424-submodule-mixed-ref-formats.sh             |   1 -
 t/t7450-bad-git-dotfiles.sh                        |   1 -
 t/t7500-commit-template-squash-signoff.sh          |   1 -
 t/t7501-commit-basic-functionality.sh              |   1 -
 t/t7502-commit-porcelain.sh                        |   1 -
 t/t7503-pre-commit-and-pre-merge-commit-hooks.sh   |   1 -
 t/t7504-commit-msg-hook.sh                         |   1 -
 t/t7505-prepare-commit-msg-hook.sh                 |   1 -
 t/t7506-status-submodule.sh                        |   1 -
 t/t7507-commit-verbose.sh                          |   1 -
 t/t7508-status.sh                                  |   1 -
 t/t7509-commit-authorship.sh                       |   1 -
 t/t7510-signed-commit.sh                           |   1 -
 t/t7511-status-index.sh                            |   1 -
 t/t7512-status-help.sh                             |   1 -
 t/t7513-interpret-trailers.sh                      |   1 -
 t/t7514-commit-patch.sh                            |   1 -
 t/t7515-status-symlinks.sh                         |   1 -
 t/t7516-commit-races.sh                            |   1 -
 t/t7517-per-repo-email.sh                          |   1 -
 t/t7518-ident-corner-cases.sh                      |   1 -
 t/t7519-status-fsmonitor.sh                        |   1 -
 t/t7520-ignored-hook-warning.sh                    |   1 -
 t/t7521-ignored-mode.sh                            |   1 -
 t/t7524-commit-summary.sh                          |   1 -
 t/t7525-status-rename.sh                           |   1 -
 t/t7526-commit-pathspec-file.sh                    |   1 -
 t/t7528-signed-commit-ssh.sh                       |   1 -
 t/t7600-merge.sh                                   |   1 -
 t/t7601-merge-pull-config.sh                       |   1 -
 t/t7602-merge-octopus-many.sh                      |   1 -
 t/t7603-merge-reduce-heads.sh                      |   1 -
 t/t7604-merge-custom-message.sh                    |   1 -
 t/t7605-merge-resolve.sh                           |   1 -
 t/t7606-merge-custom.sh                            |   1 -
 t/t7607-merge-state.sh                             |   1 -
 t/t7608-merge-messages.sh                          |   1 -
 t/t7609-mergetool--lib.sh                          |   1 -
 t/t7610-mergetool.sh                               |   1 -
 t/t7611-merge-abort.sh                             |   1 -
 t/t7612-merge-verify-signatures.sh                 |   1 -
 t/t7614-merge-signoff.sh                           |   1 -
 t/t7615-diff-algo-with-mergy-operations.sh         |   1 -
 t/t7700-repack.sh                                  |   1 -
 t/t7701-repack-unpack-unreachable.sh               |   1 -
 t/t7702-repack-cyclic-alternate.sh                 |   1 -
 t/t7703-repack-geometric.sh                        |   1 -
 t/t7704-repack-cruft.sh                            |   1 -
 t/t7800-difftool.sh                                |   1 -
 t/t7810-grep.sh                                    |   1 -
 t/t7811-grep-open.sh                               |   1 -
 t/t7812-grep-icase-non-ascii.sh                    |   1 -
 t/t7813-grep-icase-iso.sh                          |   1 -
 t/t7814-grep-recurse-submodules.sh                 |   1 -
 t/t7815-grep-binary.sh                             |   1 -
 t/t7816-grep-binary-pattern.sh                     |   1 -
 t/t7817-grep-sparse-checkout.sh                    |   1 -
 t/t7900-maintenance.sh                             |   1 -
 t/t8001-annotate.sh                                |   1 -
 t/t8002-blame.sh                                   |   1 -
 t/t8003-blame-corner-cases.sh                      |   1 -
 t/t8004-blame-with-conflicts.sh                    |   1 -
 t/t8005-blame-i18n.sh                              |   1 +
 t/t8006-blame-textconv.sh                          |   1 -
 t/t8007-cat-file-textconv.sh                       |   1 -
 t/t8008-blame-formats.sh                           |   1 -
 t/t8009-blame-vs-topicbranches.sh                  |   1 -
 t/t8010-cat-file-filters.sh                        |   1 -
 t/t8011-blame-split-file.sh                        |   1 -
 t/t8012-blame-colors.sh                            |   1 -
 t/t8013-blame-ignore-revs.sh                       |   1 -
 t/t8014-blame-ignore-fuzzy.sh                      |   1 -
 t/t9001-send-email.sh                              |   1 -
 t/t9002-column.sh                                  |   1 -
 t/t9003-help-autocorrect.sh                        |   1 -
 t/t9200-git-cvsexportcommit.sh                     |   1 -
 t/t9210-scalar.sh                                  |   1 -
 t/t9211-scalar-clone.sh                            |   1 -
 t/t9300-fast-import.sh                             |   1 -
 t/t9301-fast-import-notes.sh                       |   1 -
 t/t9302-fast-import-unpack-limit.sh                |   1 -
 t/t9303-fast-import-compression.sh                 |   1 -
 t/t9304-fast-import-marks.sh                       |   1 -
 t/t9350-fast-export.sh                             |   1 -
 t/t9351-fast-export-anonymize.sh                   |   1 -
 t/t9400-git-cvsserver-server.sh                    |   1 -
 t/t9401-git-cvsserver-crlf.sh                      |   1 -
 t/t9402-git-cvsserver-refs.sh                      |   1 -
 t/t9500-gitweb-standalone-no-errors.sh             |   1 -
 t/t9501-gitweb-standalone-http-status.sh           |   1 -
 t/t9502-gitweb-standalone-parse-output.sh          |   1 -
 t/t9600-cvsimport.sh                               |   1 -
 t/t9601-cvsimport-vendor-branch.sh                 |   1 -
 t/t9602-cvsimport-branches-tags.sh                 |   1 -
 t/t9603-cvsimport-patchsets.sh                     |   1 -
 t/t9604-cvsimport-timestamps.sh                    |   1 -
 t/t9700-perl-git.sh                                |   1 -
 t/t9800-git-p4-basic.sh                            |   1 -
 t/t9801-git-p4-branch.sh                           |   1 -
 t/t9802-git-p4-filetype.sh                         |   1 -
 t/t9803-git-p4-shell-metachars.sh                  |   1 -
 t/t9804-git-p4-label.sh                            |   1 -
 t/t9805-git-p4-skip-submit-edit.sh                 |   1 -
 t/t9806-git-p4-options.sh                          |   1 -
 t/t9808-git-p4-chdir.sh                            |   1 -
 t/t9809-git-p4-client-view.sh                      |   1 -
 t/t9810-git-p4-rcs.sh                              |   1 -
 t/t9811-git-p4-label-import.sh                     |   1 -
 t/t9812-git-p4-wildcards.sh                        |   1 -
 t/t9813-git-p4-preserve-users.sh                   |   1 -
 t/t9814-git-p4-rename.sh                           |   1 -
 t/t9815-git-p4-submit-fail.sh                      |   1 -
 t/t9816-git-p4-locked.sh                           |   1 -
 t/t9817-git-p4-exclude.sh                          |   1 -
 t/t9818-git-p4-block.sh                            |   1 -
 t/t9819-git-p4-case-folding.sh                     |   1 -
 t/t9820-git-p4-editor-handling.sh                  |   1 -
 t/t9821-git-p4-path-variations.sh                  |   1 -
 t/t9822-git-p4-path-encoding.sh                    |   1 -
 t/t9823-git-p4-mock-lfs.sh                         |   1 -
 t/t9825-git-p4-handle-utf16-without-bom.sh         |   1 -
 t/t9826-git-p4-keep-empty-commits.sh               |   1 -
 t/t9827-git-p4-change-filetype.sh                  |   1 -
 t/t9828-git-p4-map-user.sh                         |   1 -
 t/t9829-git-p4-jobs.sh                             |   1 -
 t/t9830-git-p4-symlink-dir.sh                      |   1 -
 t/t9831-git-p4-triggers.sh                         |   1 -
 t/t9832-unshelve.sh                                |   1 -
 t/t9833-errors.sh                                  |   1 -
 t/t9834-git-p4-file-dir-bug.sh                     |   1 -
 t/t9835-git-p4-metadata-encoding-python2.sh        |   1 -
 t/t9836-git-p4-metadata-encoding-python3.sh        |   1 -
 t/t9850-shell.sh                                   |   1 -
 t/t9901-git-web--browse.sh                         |   1 -
 t/t9902-completion.sh                              |   1 -
 t/t9903-bash-prompt.sh                             |   1 -
 t/test-lib.sh                                      |  72 +-----------
 t/unit-tests/strvec.c                              |  65 +++++++++++
 usage.c                                            |  15 ---
 950 files changed, 366 insertions(+), 1249 deletions(-)

Range-diff versus v1:

 1:  09dbc39ffb =  1:  76daa9584b builtin/blame: fix leaking blame entries with `--incremental`
 2:  15bbe539ea =  2:  6659f0d59b bisect: fix leaking good/bad terms when reading multipe times
 3:  739e28c864 =  3:  5a9011e1ef bisect: fix leaking string in `handle_bad_merge_base()`
 4:  fa91eb9dc6 =  4:  3afc0a7bfe bisect: fix leaking `current_bad_oid`
 5:  4ca01afd9e =  5:  15577aaae6 bisect: fix multiple leaks in `bisect_next_all()`
 6:  805b91ce20 =  6:  13ddfed4fc bisect: fix leaking commit list items in `check_merge_base()`
 7:  0f183fb264 !  7:  0bc49ed3bb bisect: fix various cases where we leak commit list items
    @@ bisect.c: static struct commit_list *skip_away(struct commit_list *list, int cou
     +			else if (previous)
     +				result = previous;
     +			else
    -+				result =  list;
    ++				result = list;
     +			break;
      		}
      		previous = cur;
 8:  163c36c78e =  8:  addba1afce line-log: fix leak when rewriting commit parents
 9:  c0bcfbd98b =  9:  6e501effad strvec: introduce new `strvec_splice()` function
10:  cf0ac084c5 = 10:  2271761621 git: refactor alias handling to use a `struct strvec`
11:  c4989aab86 = 11:  7bff5d167f git: refactor builtin handling to use a `struct strvec`
12:  483d2951cc = 12:  e93d461504 split-index: fix memory leak in `move_cache_to_base_index()`
13:  70b12d6347 = 13:  a0643da6f5 builtin/sparse-checkout: fix leaking sanitized patterns
14:  f57d967cd5 = 14:  881feffeb1 help: refactor to not use globals for reading config
15:  45aacddc8a <  -:  ---------- help: fix leaking `struct cmdnames`
 -:  ---------- > 15:  f1bbb676f2 help: fix leaking `struct cmdnames`
16:  b61cc4da84 ! 16:  51c7ad993f help: fix leaking return value from `help_unknown_cmd()`
    @@ help.c: static const char bad_interpreter_advice[] =
      {
      	struct help_unknown_cmd_config cfg = { 0 };
      	int i, n, best_similarity = 0;
    - 	struct cmdnames main_cmds = { 0 };
    - 	struct cmdnames other_cmds = { 0 };
    - 	struct cmdname_help *common_cmds;
    --	const char *assumed = NULL;
    -+	char *assumed = NULL;
    - 
    - 	read_early_config(the_repository, git_unknown_cmd_config, &cfg);
    - 
     @@ help.c: const char *help_unknown_cmd(const char *cmd)
      			; /* still counting */
      	}
      	if (cfg.autocorrect && n == 1 && SIMILAR_ENOUGH(best_similarity)) {
    --		assumed = main_cmds.names[0]->name;
    +-		const char *assumed = main_cmds.names[0]->name;
     -		main_cmds.names[0] = NULL;
     -		cmdnames_release(&main_cmds);
    -+		assumed = xstrdup(main_cmds.names[0]->name);
    ++		char *assumed = xstrdup(main_cmds.names[0]->name);
     +
      		fprintf_ln(stderr,
      			   _("WARNING: You called a Git command named '%s', "
      			     "which does not exist."),
    -@@ help.c: const char *help_unknown_cmd(const char *cmd)
    - 			strbuf_release(&msg);
    - 			if (!(starts_with(answer, "y") ||
    - 			      starts_with(answer, "Y"))) {
    --				assumed = NULL;
    -+				FREE_AND_NULL(assumed);
    - 				goto out;
    - 			}
    - 		} else {
     
      ## help.h ##
     @@ help.h: void list_all_other_cmds(struct string_list *list);
17:  b38a39ef04 = 17:  38a25da315 builtin/help: fix leaks in `check_git_cmd()`
18:  cd5cde9acb ! 18:  462c9fc110 builtin/init-db: fix leaking directory paths
    @@ builtin/init-db.c: int cmd_init_db(int argc,
     -
      	flags |= INIT_DB_EXIST_OK;
     -	return init_db(git_dir, real_git_dir, template_dir, hash_algo,
    -+	ret =  init_db(git_dir, real_git_dir, template_dir, hash_algo,
    - 		       ref_storage_format, initial_branch,
    - 		       init_shared_repository, flags);
    +-		       ref_storage_format, initial_branch,
    +-		       init_shared_repository, flags);
    ++	ret = init_db(git_dir, real_git_dir, template_dir, hash_algo,
    ++		      ref_storage_format, initial_branch,
    ++		      init_shared_repository, flags);
     +
     +	free(template_dir_to_free);
     +	free(real_git_dir_to_free);
19:  2c7b50461b = 19:  6eabeed343 builtin/branch: fix leaking sorting options
20:  6865dda344 = 20:  2a44bbfba3 t/helper: fix leaking commit graph in "read-graph" subcommand
 -:  ---------- > 21:  fc8a96bac3 global: drop `UNLEAK()` annotation
21:  d7d8ece289 ! 22:  10e44976c2 git-compat-util: drop `UNLEAK()` annotation

@@ Metadata
Author: Patrick Steinhardt <[email protected]>

## Commit message ##
- git-compat-util: drop UNLEAK() annotation
+ git-compat-util: drop now-unused UNLEAK() macro

- 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
+ The UNLEAK() macro has been introduced with 0e5bba53af (add UNLEAK
+ annotation for reducing leak false positives, 2017-09-08) to help us
+ reduce the amount of reported memory leaks in cases we don't care about,
+ e.g. when exiting immediately afterwards. We have since removed all of
+ its users in favor of freeing the memory and thus don't need the macro
anymore.

- Remove the last two users and drop the now-unused UNLEAK() annotation.
+ Remove it.

- ## builtin/clone.c ##
-@@ builtin/clone.c: int cmd_clone(int argc,
- free(dir);
- free(path);
- free(repo_to_free);
-- UNLEAK(repo);
- junk_mode = JUNK_LEAVE_ALL;
-
- transport_ls_refs_options_release(&transport_ls_refs_options);
-
- ## builtin/diff.c ##
-@@ builtin/diff.c: int cmd_diff(int argc,
- release_revisions(&rev);
- object_array_clear(&ent);
- symdiff_release(&sdiff);
-- UNLEAK(blob);
- return result;
- }
-
## git-compat-util.h ##
@@ git-compat-util.h: int cmd_main(int, const char **);
int common_exit(const char *file, int line, int code);

22:  d52ca35b05 = 23:  218132b7d5 t5601: work around leak sanitizer issue
23:  44b48929fb = 24:  832c87a045 t: mark some tests as leak free
24:  b1fdbe04be = 25:  5fc1319241 t: remove unneeded !SANITIZE_LEAK prerequisites
25:  2b752b71c6 = 26:  06a1e8b27c test-lib: unconditionally enable leak checking
26:  53bc5f7d75 = 27:  19428158c8 t: remove TEST_PASSES_SANITIZE_LEAK annotations

---
base-commit: b0c643d6a710e2b092902a3941655176b358bfd0
change-id: 20241111-b4-pks-leak-fixes-pt10-a6fa657f4fac

#40 lore raw

PATCH v2 1/27 builtin/blame: fix leaking blame entries with `--incremental`

When passing --incremental to git-blame(1) we exit early by jumping to the cleanup label. But some of the cleanups we perform are handled between the goto and its label, and thus we leak the data.

Move the cleanups after the cleanup label. While at it, move the logic to free the scoreboard's final_buf into cleanup_scoreboard() and drop its const declaration.

---
 blame.c               |  1 +
 blame.h               |  2 +-
 builtin/blame.c       | 12 ++++++------
 t/t8005-blame-i18n.sh |  2 ++
 4 files changed, 10 insertions(+), 7 deletions(-)
blame.c +1 -0
index 90633380cd583b689693e6cfe65c26a79448b00d..bf69768a7de6d2b989b85339a06af0a4763db4ad 100644
@@ -2931,6 +2931,7 @@ void setup_blame_bloom_data(struct blame_scoreboard *sb)
 void cleanup_scoreboard(struct blame_scoreboard *sb)
 {
 	free(sb->lineno);
+	free(sb->final_buf);
 	clear_prio_queue(&sb->commits);
 	oidset_clear(&sb->ignore_list);
 
blame.h +1 -1
index 5b4e47d44c613e31fc4788c12ee9d8dc2a49d571..3b34be0e5c6932666bf5f738eb645da25adc0997 100644
@@ -116,7 +116,7 @@ struct blame_scoreboard {
 	 * Used by many functions to obtain contents of the nth line,
 	 * indexed with scoreboard.lineno[blame_entry.lno].
 	 */
-	const char *final_buf;
+	char *final_buf;
 	unsigned long final_buf_size;
 
 	/* linked list of blames */
builtin/blame.c +6 -6
index e407a22da3bacf6bd26a6738e0ab0292ffadc216..6a7bb3b07248fbdfeb5ac3a05fed20fff4989a48 100644
@@ -1216,12 +1216,6 @@ int cmd_blame(int argc,
 		output_option &= ~(OUTPUT_COLOR_LINE | OUTPUT_SHOW_AGE_WITH_COLOR);
 
 	output(&sb, output_option);
-	free((void *)sb.final_buf);
-	for (ent = sb.ent; ent; ) {
-		struct blame_entry *e = ent->next;
-		free(ent);
-		ent = e;
-	}
 
 	if (show_stats) {
 		printf("num read blob: %d\n", sb.num_read_blob);
@@ -1230,6 +1224,12 @@ int cmd_blame(int argc,
 	}
 
 cleanup:
+	for (ent = sb.ent; ent; ) {
+		struct blame_entry *e = ent->next;
+		free(ent);
+		ent = e;
+	}
+
 	free(path);
 	cleanup_scoreboard(&sb);
 	release_revisions(&revs);
t/t8005-blame-i18n.sh +2 -0
index 7a1f581c240c71106c709a830d3897d84fd8b32d..fa765aff99aa7fbfc4737cc91aab2a6a1bce30bb 100755
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='git blame encoding conversion'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if ! test_have_prereq ICONV
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#41 lore raw

PATCH v2 2/27 bisect: fix leaking good/bad terms when reading multipe times

In reply to Patrick Steinhardt

Even though read_bisect_terms() is declared as assigning string constants, it in fact assigns allocated strings to the read_bad and read_good out parameters. The only callers of this function assign the result to global variables and thus don't have to free them in order to be leak-free. But that changes when executing the function multiple times because we'd then overwrite the previous value and thus make it unreachable.

Fix the function signature and free the previous values. This leak is exposed by t0630, but plugging it does not make the whole test suite pass.

---
 bisect.c   | 14 +++++++++-----
 bisect.h   |  2 +-
 revision.c |  4 ++--
 3 files changed, 12 insertions(+), 8 deletions(-)
bisect.c +9 -5
index 4713226fad4e16ebbda4ba2e8d13c6eaf7d4bfb2..9c52241050c14ecbf3f7950a0c5e7b962fcaa541 100644
@@ -28,8 +28,8 @@ static struct oid_array skipped_revs;
 
 static struct object_id *current_bad_oid;
 
-static const char *term_bad;
-static const char *term_good;
+static char *term_bad;
+static char *term_good;
 
 /* Remember to update object flag allocation in object.h */
 #define COUNTED		(1u<<16)
@@ -985,7 +985,7 @@ static void show_commit(struct commit *commit)
  * We read them and store them to adapt the messages accordingly.
  * Default is bad/good.
  */
-void read_bisect_terms(const char **read_bad, const char **read_good)
+void read_bisect_terms(char **read_bad, char **read_good)
 {
 	struct strbuf str = STRBUF_INIT;
 	const char *filename = git_path_bisect_terms();
@@ -993,16 +993,20 @@ void read_bisect_terms(const char **read_bad, const char **read_good)
 
 	if (!fp) {
 		if (errno == ENOENT) {
-			*read_bad = "bad";
-			*read_good = "good";
+			free(*read_bad);
+			*read_bad = xstrdup("bad");
+			free(*read_good);
+			*read_good = xstrdup("good");
 			return;
 		} else {
 			die_errno(_("could not read file '%s'"), filename);
 		}
 	} else {
 		strbuf_getline_lf(&str, fp);
+		free(*read_bad);
 		*read_bad = strbuf_detach(&str, NULL);
 		strbuf_getline_lf(&str, fp);
+		free(*read_good);
 		*read_good = strbuf_detach(&str, NULL);
 	}
 	strbuf_release(&str);
bisect.h +1 -1
index ee3fd65f3bdb89611d7575239ee79e8c50bcd703..944439bfac729cf092d6c5962c9edff2321002e4 100644
@@ -75,7 +75,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix);
 
 int estimate_bisect_steps(int all);
 
-void read_bisect_terms(const char **bad, const char **good);
+void read_bisect_terms(char **bad, char **good);
 
 int bisect_clean_state(void);
 
revision.c +2 -2
index 8df75b82249b36e7e3ee9a4a151f085c189acc45..347dabf7f9a1a87765150ec998deae9b6709b5f6 100644
@@ -51,8 +51,8 @@
 
 volatile show_early_output_fn_t show_early_output;
 
-static const char *term_bad;
-static const char *term_good;
+static char *term_bad;
+static char *term_good;
 
 implement_shared_commit_slab(revision_sources, char *);
 
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#42 lore raw

PATCH v2 3/27 bisect: fix leaking string in `handle_bad_merge_base()`

In reply to Patrick Steinhardt

When handling a bad merge base we print an error, which includes the set of good revisions joined by spaces. This string is allocated, but never freed.

Fix this memory leak. Note that the local bad_hex varible also looks like a string that we should free. But in fact, oid_to_hex() returns an address to a static variable even though it is declared to return a non-constant string. The function signature is thus quite misleading and really should be fixed, but doing so is outside of the scope of this patch series.

---
 bisect.c | 2 ++
 1 file changed, 2 insertions(+)
bisect.c +2 -0
index 9c52241050c14ecbf3f7950a0c5e7b962fcaa541..e9e603877eba059c878ff92bc11dd84553d0649e 100644
@@ -801,6 +801,8 @@ static enum bisect_error handle_bad_merge_base(void)
 				"between %s and [%s].\n"),
 				bad_hex, term_bad, term_good, bad_hex, good_hex);
 		}
+
+		free(good_hex);
 		return BISECT_MERGE_BASE_CHECK;
 	}
 
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#43 lore raw

PATCH v2 4/27 bisect: fix leaking `current_bad_oid`

In reply to Patrick Steinhardt

When reading bisect refs we read the reference mapping to the "bad" term into the global current_bad_oid variable. This is an allocated string, but because it is global we never have to free it. This changes though when register_ref() is being called multiple times, at which point we'll overwrite the previous pointer and thus make it unreachable.

Fix this issue by freeing the previous value. This leak is exposed by t6030, but plugging it does not make the whole test suite pass.

---
 bisect.c | 1 +
 1 file changed, 1 insertion(+)
bisect.c +1 -0
index e9e603877eba059c878ff92bc11dd84553d0649e..6dbc22f84fce11743f0e79eb4f8100c7ec07238f 100644
@@ -456,6 +456,7 @@ static int register_ref(const char *refname, const char *referent UNUSED, const
 	strbuf_addstr(&good_prefix, "-");
 
 	if (!strcmp(refname, term_bad)) {
+		free(current_bad_oid);
 		current_bad_oid = xmalloc(sizeof(*current_bad_oid));
 		oidcpy(current_bad_oid, oid);
 	} else if (starts_with(refname, good_prefix.buf)) {
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#44 lore raw

PATCH v2 5/27 bisect: fix multiple leaks in `bisect_next_all()`

In reply to Patrick Steinhardt

There are multiple leaks in bisect_next_all(). For one we don't free the tried commit list. Second, one of the branches uses a direct return instead of jumping to the cleanup code.

Fix these by freeing the commit list and converting the return to a goto.

---
 bisect.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
bisect.c +3 -2
index 6dbc22f84fce11743f0e79eb4f8100c7ec07238f..04e9a63f11c7fa1a9dd11d3f193c500a4cb937c6 100644
@@ -1031,7 +1031,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix)
 {
 	struct strvec rev_argv = STRVEC_INIT;
 	struct rev_info revs = REV_INFO_INIT;
-	struct commit_list *tried;
+	struct commit_list *tried = NULL;
 	int reaches = 0, all = 0, nr, steps;
 	enum bisect_error res = BISECT_OK;
 	struct object_id *bisect_rev;
@@ -1098,7 +1098,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix)
 	if (oideq(bisect_rev, current_bad_oid)) {
 		res = error_if_skipped_commits(tried, current_bad_oid);
 		if (res)
-			return res;
+			goto cleanup;
 		printf("%s is the first %s commit\n", oid_to_hex(bisect_rev),
 			term_bad);
 
@@ -1132,6 +1132,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix)
 
 	res = bisect_checkout(bisect_rev, no_checkout);
 cleanup:
+	free_commit_list(tried);
 	release_revisions(&revs);
 	strvec_clear(&rev_argv);
 	return res;
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#45 lore raw

PATCH v2 6/27 bisect: fix leaking commit list items in `check_merge_base()`

In reply to Patrick Steinhardt

While we free the result commit list at the end of check_merge_base(), we forget to free any items that we have already iterated over. Fix this by using a separate variable to iterate through them.

This leak is exposed by t6030, but plugging it does not make the whole test suite pass.

---
 bisect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bisect.c +2 -2
index 04e9a63f11c7fa1a9dd11d3f193c500a4cb937c6..12efcff2e3c1836ab6e63d36e4d42269fbcaeaab 100644
@@ -851,8 +851,8 @@ static enum bisect_error check_merge_bases(int rev_nr, struct commit **rev, int
 				      rev + 1, &result) < 0)
 		exit(128);
 
-	for (; result; result = result->next) {
-		const struct object_id *mb = &result->item->object.oid;
+	for (struct commit_list *l = result; l; l = l->next) {
+		const struct object_id *mb = &l->item->object.oid;
 		if (oideq(mb, current_bad_oid)) {
 			res = handle_bad_merge_base();
 			break;
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#46 lore raw

PATCH v2 7/27 bisect: fix various cases where we leak commit list items

In reply to Patrick Steinhardt

There are various cases where we leak commit list items because we evict items from the list, but don't free them. Plug those.

---
 bisect.c                    | 35 +++++++++++++++++++++++++++--------
 t/t6030-bisect-porcelain.sh |  1 +
 2 files changed, 28 insertions(+), 8 deletions(-)
bisect.c +27 -8
index 12efcff2e3c1836ab6e63d36e4d42269fbcaeaab..0e804086cbf6a02d42bda98b62fb86daf099b82d 100644
@@ -440,11 +440,19 @@ void find_bisection(struct commit_list **commit_list, int *reaches,
 			free_commit_list(list->next);
 			best = list;
 			best->next = NULL;
+		} else {
+			for (p = list; p != best; p = next) {
+				next = p->next;
+				free(p);
+			}
 		}
 		*reaches = weight(best);
+	} else {
+		free_commit_list(*commit_list);
 	}
-	free(weights);
 	*commit_list = best;
+
+	free(weights);
 	clear_commit_weight(&commit_weight);
 }
 
@@ -557,8 +565,11 @@ struct commit_list *filter_skipped(struct commit_list *list,
 			tried = &list->next;
 		} else {
 			if (!show_all) {
-				if (!skipped_first || !*skipped_first)
+				if (!skipped_first || !*skipped_first) {
+					free_commit_list(next);
+					free_commit_list(filtered);
 					return list;
+				}
 			} else if (skipped_first && !*skipped_first) {
 				/* This means we know it's not skipped */
 				*skipped_first = -1;
@@ -614,7 +625,7 @@ static int sqrti(int val)
 
 static struct commit_list *skip_away(struct commit_list *list, int count)
 {
-	struct commit_list *cur, *previous;
+	struct commit_list *cur, *previous, *result = list;
 	int prn, index, i;
 
 	prn = get_prn(count);
@@ -626,15 +637,23 @@ static struct commit_list *skip_away(struct commit_list *list, int count)
 	for (i = 0; cur; cur = cur->next, i++) {
 		if (i == index) {
 			if (!oideq(&cur->item->object.oid, current_bad_oid))
-				return cur;
-			if (previous)
-				return previous;
-			return list;
+				result = cur;
+			else if (previous)
+				result = previous;
+			else
+				result = list;
+			break;
 		}
 		previous = cur;
 	}
 
-	return list;
+	for (cur = list; cur != result; ) {
+		struct commit_list *next = cur->next;
+		free(cur);
+		cur = next;
+	}
+
+	return result;
 }
 
 static struct commit_list *managed_skipped(struct commit_list *list,
t/t6030-bisect-porcelain.sh +1 -0
index cdc02706404b34b17b29692d72d97fab7eba58b1..310affadebed321fcc93ee5bd785abf4ca013cc1 100755
@@ -9,6 +9,7 @@ exec </dev/null
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 add_line_into_file()
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#47 lore raw

Re: [PATCH v2 07/27] bisect: fix various cases where we leak commit list items

Quoted 14 lines · Patrick Steinhardt

There are various cases where we leak commit list items because we evict items from the list, but don't free them. Plug those.

---
 bisect.c                    | 35 +++++++++++++++++++++++++++--------
 t/t6030-bisect-porcelain.sh |  1 +
 2 files changed, 28 insertions(+), 8 deletions(-)
bisect.c +0 -0
index 12efcff2e3c1836ab6e63d36e4d42269fbcaeaab..0e804086cbf6a02d42bda98b62fb86daf099b82d 100644

bisect.c void find_bisection(struct commit_list **commit_list, int *reaches, · line 447

Quoted 8 lines
bisect.c +5 -0
@@ -440,11 +440,19 @@ void find_bisection(struct commit_list **commit_list, int *reaches,
 			free_commit_list(list->next);
 			best = list;
 			best->next = NULL;
+		} else {
+			for (p = list; p != best; p = next) {
+				next = p->next;
+				free(p);
+			}

This makes the code do:

    if (!something) {
        // ...
    } else {
        // ...
    }

I find it odd reading code like that. Would you mind swapping them around? Or is there a reason we type it like this, because I see this also being done like this around line 393?

More on the functional side of this code, I'd like to understand better what's happening here.
It's clear to me when best is NULL we want to free the whole commit_list. And when best is set with FIND_BISECTION_ALL flag set, we want to free the commit_list up to best. But when the FIND_BISECTION_ALL flag is not set, we want to do the opposite, free from best->next till the end? But what has this to do with FIND_BISECTION_ALL?

--
Toon

#48 lore raw

Re: [PATCH v2 07/27] bisect: fix various cases where we leak commit list items

Quoted 33 lines · Toon Claes
Quoted 14 lines · Patrick Steinhardt

There are various cases where we leak commit list items because we evict items from the list, but don't free them. Plug those.

---
 bisect.c                    | 35 +++++++++++++++++++++++++++--------
 t/t6030-bisect-porcelain.sh |  1 +
 2 files changed, 28 insertions(+), 8 deletions(-)
bisect.c +0 -0
index 12efcff2e3c1836ab6e63d36e4d42269fbcaeaab..0e804086cbf6a02d42bda98b62fb86daf099b82d 100644

bisect.c void find_bisection(struct commit_list **commit_list, int *reaches, · line 447

Quoted 8 lines
bisect.c +5 -0
@@ -440,11 +440,19 @@ void find_bisection(struct commit_list **commit_list, int *reaches,
 			free_commit_list(list->next);
 			best = list;
 			best->next = NULL;
+		} else {
+			for (p = list; p != best; p = next) {
+				next = p->next;
+				free(p);
+			}

This makes the code do:

    if (!something) {
        // ...
    } else {
        // ...
    }
Quoted 3 lines

I find it odd reading code like that. Would you mind swapping them around? Or is there a reason we type it like this, because I see this also being done like this around line 393?

I mostly did it this way round to minimize the diff.

Quoted 8 lines

More on the functional side of this code, I'd like to understand better what's happening here.
It's clear to me when best is NULL we want to free the whole commit_list. And when best is set with FIND_BISECTION_ALL flag set, we want to free the commit_list up to best. But when the FIND_BISECTION_ALL flag is not set, we want to do the opposite, free from best->next till the end? But what has this to do with FIND_BISECTION_ALL?

Good question.

Typically, find_bisection() will only return a single commit, which is the next bisection point in the range of bisected commit. This is done by approximation, where we want to find a commit that is roughly half way between the current good and bad commits. So the result should be a single commit, only, and thus we free all other commit items except for the commit that we have determined to be the bisection point.

When FIND_BISECTION_ALL is set this changes: instead of returning a single commit, we return all commits in the bisected range of commits, but tag them with the distance to the included and excluded commits. So the result is a list of commits, but that list may have been filtered down from the list of commits passed into do_find_bisection().

So when do we filter items? This happens in best_bisection_sorted(), where we skip over commits which are treesame. But for all I can see we never end up skipping over the head of the list, we may only exclude times from its tail, and we do know to release the tail alright.

Which means... that the added code is effectively a no-op because best will always be pointing to list. Removing the code and re-running with the leak checker enabled confirms that there are no new leaks. I'll drop it, no idea what I saw here.

Patrick

#49 lore raw

PATCH v2 8/27 line-log: fix leak when rewriting commit parents

In reply to Patrick Steinhardt

In process_ranges_merge_commit() we try to figure out which of the parents can be blamed for the given line changes. When we figure out that none of the files in the line-log have changed we assign the complete blame to that commit and rewrite the parents of the current commit to only use that single parent.

This is done via commit_list_append(), which is misleadingly _not_ appending to the list of parents. Instead, we overwrite the parents with the blamed parent. This makes us lose track of the old pointers, creating a memory leak.

Fix this issue by freeing the parents before we overwrite them.

---
 line-log.c          | 1 +
 t/t4211-line-log.sh | 1 +
 2 files changed, 2 insertions(+)
line-log.c +1 -0
index bca9bd804073df9b77b2859063ac5ad4d3b24e0f..bc67b75d10d34edc726c00c887d57016e40f3a00 100644
@@ -1237,6 +1237,7 @@ static int process_ranges_merge_commit(struct rev_info *rev, struct commit *comm
 			 * don't follow any other path in history
 			 */
 			add_line_range(rev, parents[i], cand[i]);
+			free_commit_list(commit->parents);
 			commit_list_append(parents[i], &commit->parents);
 
 			ret = 0;
t/t4211-line-log.sh +1 -0
index 950451cf6a66e6c099aa5303ce19230c34cd1fc4..1d6dd982a2a858e9ca03635eb83b1463c9c9caed 100755
@@ -4,6 +4,7 @@ test_description='test log -L'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup (import history)' '
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#50 lore raw

PATCH v2 9/27 strvec: introduce new `strvec_splice()` function

In reply to Patrick Steinhardt

Introduce a new strvec_splice() function that can replace a range of strings in the vector with another array of strings. This function will be used in subsequent commits.

---
 strvec.c              | 19 +++++++++++++++
 strvec.h              |  9 +++++++
 t/unit-tests/strvec.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+)
strvec.c +19 -0
index f712070f5745d5f998d0846ac4009441dddfa500..81075c50cca4fe44608775541d876294a79d9e4e 100644
@@ -56,6 +56,25 @@ void strvec_pushv(struct strvec *array, const char **items)
 		strvec_push(array, *items);
 }
 
+void strvec_splice(struct strvec *array, size_t pos, size_t len,
+		   const char **replacement, size_t replacement_len)
+{
+	if (pos + len > array->alloc)
+		BUG("range outside of array boundary");
+	if (replacement_len > len)
+		ALLOC_GROW(array->v, array->nr + (replacement_len - len) + 1,
+			   array->alloc);
+	for (size_t i = 0; i < len; i++)
+		free((char *)array->v[pos + i]);
+	if (replacement_len != len) {
+		memmove(array->v + pos + replacement_len, array->v + pos + len,
+			(array->nr - pos - len + 1) * sizeof(char *));
+		array->nr += (replacement_len - len);
+	}
+	for (size_t i = 0; i < replacement_len; i++)
+		array->v[pos + i] = xstrdup(replacement[i]);
+}
+
 const char *strvec_replace(struct strvec *array, size_t idx, const char *replacement)
 {
 	char *to_free;
strvec.h +9 -0
index 4b73c1f092e9b016ce3299035477713c6267cdae..4e61cc9336938a95318974903f9b35dcdc4da1cd 100644
@@ -67,6 +67,15 @@ void strvec_pushl(struct strvec *, ...);
 /* Push a null-terminated array of strings onto the end of the array. */
 void strvec_pushv(struct strvec *, const char **);
 
+/*
+ * Replace `len` values starting at `pos` with the provided replacement
+ * strings. If `len` is zero this is effectively an insert at the given `pos`.
+ * If `replacement_len` is zero this is effectively a delete of `len` items
+ * starting at `pos`.
+ */
+void strvec_splice(struct strvec *array, size_t pos, size_t len,
+		   const char **replacement, size_t replacement_len);
+
 /**
  * Replace the value at the given index with a new value. The index must be
  * valid. Returns a pointer to the inserted value.
t/unit-tests/strvec.c +65 -0

71 lines not on this page · raw message

Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#51 lore raw

Re: [PATCH v2 09/27] strvec: introduce new `strvec_splice()` function

Quoted 16 lines · Patrick Steinhardt

Introduce a new strvec_splice() function that can replace a range of strings in the vector with another array of strings. This function will be used in subsequent commits.

---
 strvec.c              | 19 +++++++++++++++
 strvec.h              |  9 +++++++
 t/unit-tests/strvec.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+)
strvec.c +0 -0
index f712070f5745d5f998d0846ac4009441dddfa500..81075c50cca4fe44608775541d876294a79d9e4e 100644

strvec.c void strvec_pushv(struct strvec *array, const char **items) · line 63

Quoted 8 lines
strvec.c +5 -0
@@ -56,6 +56,25 @@ void strvec_pushv(struct strvec *array, const char **items)
 		strvec_push(array, *items);
 }
 
+void strvec_splice(struct strvec *array, size_t pos, size_t len,
+		   const char **replacement, size_t replacement_len)
+{
+	if (pos + len > array->alloc)
+		BUG("range outside of array boundary");

Why aren't you checking against array->nr? I was trying a test case for this, and this seems to be unexpected behavior:

	void test_strvec__splice_insert_after_nr(void)
	{
		struct strvec vec = STRVEC_INIT;
		const char *replacement[] = { "1" };

		strvec_pushl(&vec, "foo", "bar", "baz", "buzz", "fuzz", NULL);
		strvec_pop(&vec);
		check_strvec(&vec, "foo", "bar", "baz", "buzz", NULL);
		strvec_pop(&vec);
		check_strvec(&vec, "foo", "bar", "baz", NULL);
		strvec_pop(&vec);
		strvec_splice(&vec, 4, 1, replacement, ARRAY_SIZE(replacement));
		check_strvec(&vec, "foo", "bar", "baz", NULL, "1", NULL);
		strvec_clear(&vec);
	}
Quoted 22 lines
strvec.c +14 -0
+	if (replacement_len > len)
+		ALLOC_GROW(array->v, array->nr + (replacement_len - len) + 1,
+			   array->alloc);
+	for (size_t i = 0; i < len; i++)
+		free((char *)array->v[pos + i]);
+	if (replacement_len != len) {
+		memmove(array->v + pos + replacement_len, array->v + pos + len,
+			(array->nr - pos - len + 1) * sizeof(char *));
+		array->nr += (replacement_len - len);
+	}
+	for (size_t i = 0; i < replacement_len; i++)
+		array->v[pos + i] = xstrdup(replacement[i]);
+}
+
 const char *strvec_replace(struct strvec *array, size_t idx, const char *replacement)
 {
 	char *to_free;
strvec.h +0 -0
index 4b73c1f092e9b016ce3299035477713c6267cdae..4e61cc9336938a95318974903f9b35dcdc4da1cd 100644

strvec.h void strvec_pushl(struct strvec *, ...); · line 70

Quoted 4 lines
strvec.h +1 -0
@@ -67,6 +67,15 @@ void strvec_pushl(struct strvec *, ...);
 /* Push a null-terminated array of strings onto the end of the array. */
 void strvec_pushv(struct strvec *, const char **);
 
+/*

Tiniest nit: I see the majority of the function comments in this file start with a double asterisk, should we do the same here?

strvec.h void strvec_pushl(struct strvec *, ...); · line 76

Quoted 6 lines
strvec.h +6 -0
+ * Replace `len` values starting at `pos` with the provided replacement
+ * strings. If `len` is zero this is effectively an insert at the given `pos`.
+ * If `replacement_len` is zero this is effectively a delete of `len` items
+ * starting at `pos`.
+ */
+void strvec_splice(struct strvec *array, size_t pos, size_t len,

In this file we seem to commonly use idx instead of pos.

Signature · 1 line
Toon
#52 lore raw

Re: [PATCH v2 09/27] strvec: introduce new `strvec_splice()` function

Quoted 21 lines · Toon Claes
Quoted 19 lines · Patrick Steinhardt

Introduce a new strvec_splice() function that can replace a range of strings in the vector with another array of strings. This function will be used in subsequent commits.

---
 strvec.c              | 19 +++++++++++++++
 strvec.h              |  9 +++++++
 t/unit-tests/strvec.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+)
strvec.c +0 -0
index f712070f5745d5f998d0846ac4009441dddfa500..81075c50cca4fe44608775541d876294a79d9e4e 100644
@@ -56,6 +56,25 @@ void strvec_pushv(struct strvec *array, const char **items)
 		strvec_push(array, *items);
 }
 
Quoted 8 lines

strvec.c void strvec_pushv(struct strvec *array, const char **items) · line 63

Quoted 5 lines
strvec.c +5 -0
+void strvec_splice(struct strvec *array, size_t pos, size_t len,
+		   const char **replacement, size_t replacement_len)
+{
+	if (pos + len > array->alloc)
+		BUG("range outside of array boundary");

Why aren't you checking against array->nr? I was trying a test case for this, and this seems to be unexpected behavior:

Oh, good catch!

Quoted 7 lines
	void test_strvec__splice_insert_after_nr(void)
	{
		struct strvec vec = STRVEC_INIT;
		const char *replacement[] = { "1" };

		strvec_pushl(&vec, "foo", "bar", "baz", "buzz", "fuzz", NULL);
		strvec_pop(&vec);
Quoted 8 lines
		check_strvec(&vec, "foo", "bar", "baz", "buzz", NULL);
		strvec_pop(&vec);
		check_strvec(&vec, "foo", "bar", "baz", NULL);
		strvec_pop(&vec);
		strvec_splice(&vec, 4, 1, replacement, ARRAY_SIZE(replacement));
		check_strvec(&vec, "foo", "bar", "baz", NULL, "1", NULL);
		strvec_clear(&vec);
	}

I'd love to add such a test and verify that it fails as expected. But the problem is that the API we have just BUG()s and thus causes the program to die. We could adapt the new function to not die but instead bubble up error codes, but I'd rather do that in a separate patch series that goes over the whole interface.

Quoted 8 lines
Quoted 8 lines
strvec.h +0 -0
index 4b73c1f092e9b016ce3299035477713c6267cdae..4e61cc9336938a95318974903f9b35dcdc4da1cd 100644
@@ -67,6 +67,15 @@ void strvec_pushl(struct strvec *, ...);
 /* Push a null-terminated array of strings onto the end of the array. */
 void strvec_pushv(struct strvec *, const char **);
 
Quoted 4 lines

strvec.h void strvec_pushl(struct strvec *, ...); · line 70

Quoted 1 line
strvec.h +1 -0
+/*

Tiniest nit: I see the majority of the function comments in this file start with a double asterisk, should we do the same here?

Double asterisks are typically used in contexts where comments should be extracted via tools like Doxygen. We don't do that in Git, so I don't see a reason to have the double asterisk. Our CodingGuidelines don't mention double asterisks, either.

Quoted 8 lines

strvec.h void strvec_pushl(struct strvec *, ...); · line 76

Quoted 6 lines
strvec.h +6 -0
+ * Replace `len` values starting at `pos` with the provided replacement
+ * strings. If `len` is zero this is effectively an insert at the given `pos`.
+ * If `replacement_len` is zero this is effectively a delete of `len` items
+ * starting at `pos`.
+ */
+void strvec_splice(struct strvec *array, size_t pos, size_t len,

In this file we seem to commonly use idx instead of pos.

Fair, will adapt.

Patrick

#53 lore raw

Re: [PATCH v2 09/27] strvec: introduce new `strvec_splice()` function

Quoted 4 lines · Patrick Steinhardt

Double asterisks are typically used in contexts where comments should be extracted via tools like Doxygen. We don't do that in Git, so I don't see a reason to have the double asterisk. Our CodingGuidelines don't mention double asterisks, either.

Should we add an explicit mention that we frown upon double-asterisks, even though many have already slipped into our codebase already?

I personally do not particularly mind people _preparing_ for that someday when somebody starts extracting document snippets out with these double-asterisks as clues, but unless/until we decide to (or not to) enable doxygen processing on our codebase, let's not insist on adding/deleting double-asterisks in new code during the review, and let's not churn existing code with a patch that only adds more double-asterisks or removes existing ones.

Thanks.

#54 lore raw

Re: [PATCH v2 09/27] strvec: introduce new `strvec_splice()` function

Quoted 9 lines · Junio C Hamano
Quoted 4 lines · Patrick Steinhardt

Double asterisks are typically used in contexts where comments should be extracted via tools like Doxygen. We don't do that in Git, so I don't see a reason to have the double asterisk. Our CodingGuidelines don't mention double asterisks, either.

Should we add an explicit mention that we frown upon double-asterisks, even though many have already slipped into our codebase already?

A bit of history:

I'm not sure if "slipped in" is accurate here. IIRC, when I proposed moving the contents of Documentation/technical/api-* into header files, there was some push-back that people preferred to be able to extract them to read as stand-alone, even if we did not support a full tool like doxygen. But AFAIK nobody ever wrote that tool (or at least if they did they did not share it with the list). So I started with "/**" as a mechanism to allow extraction, but it has probably bit-rotted

Looking back in the archive, though, I think "people" was Jonathan Nieder and "push-back" is probably over-stating his position. This is the closest thread I found:

https://lore.kernel.org/git/[email protected]/

I dunno what any of that means for now, though. I am OK officially declaring the "/**" thing something we we do not care about, if nobody is using them. I've added Jonathan to the cc in case he has comments.

Quoted 7 lines

I personally do not particularly mind people _preparing_ for that someday when somebody starts extracting document snippets out with these double-asterisks as clues, but unless/until we decide to (or not to) enable doxygen processing on our codebase, let's not insist on adding/deleting double-asterisks in new code during the review, and let's not churn existing code with a patch that only adds more double-asterisks or removes existing ones.

Like you, I would be happy not to see patches adding or removing them in existing code. To me the point of an official declaration is just to tell people not to do so. :)

-Peff

#55 lore raw

Re: [PATCH v2 09/27] strvec: introduce new `strvec_splice()` function

Quoted 9 lines · Jeff King

Looking back in the archive, though, I think "people" was Jonathan Nieder and "push-back" is probably over-stating his position. This is the closest thread I found:

https://lore.kernel.org/git/[email protected]/

I dunno what any of that means for now, though. I am OK officially declaring the "/**" thing something we we do not care about, if nobody is using them. I've added Jonathan to the cc in case he has comments.

Also, déjà vu:

https://lore.kernel.org/git/[email protected]/

That thread has more back-and-forth on the subject, but unless you have an abundance of spare time, I do not think it is worth reading in detail.

-Peff

#56 lore raw

Doxygen-styled comments [was: Re: [PATCH v2 09/27] strvec: introduce new `strvec_splice()` function]

In reply to Jeff King
Quoted 4 lines · Jeff King
Quoted 2 lines · Junio C Hamano

let's not insist
on adding/deleting double-asterisks in new code during the review,

Okay, understood.

Quoted 5 lines
Quoted 2 lines

and let's not churn existing code with a patch that only adds more double-asterisks or removes existing ones.

Like you, I would be happy not to see patches adding or removing them in existing code.

Oh yeah, I agree at this point it doesn't make sense.

Quoted 2 lines

To me the point of an official declaration is just to tell people not to do so. :)

What do you mean? Do you want to formalize in the contribution docs we will not accept patches only changing the formatting of code comments?

--
Toon

#57 lore raw

Re: Doxygen-styled comments [was: Re: [PATCH v2 09/27] strvec: introduce new `strvec_splice()` function]

Quoted 5 lines · Toon Claes
Quoted 2 lines

To me the point of an official declaration is just to tell people not to do so. :)

What do you mean? Do you want to formalize in the contribution docs we will not accept patches only changing the formatting of code comments?

I just meant that by clarifying our position we would not have people sending patches adding or removing, or arguing about whether they should exist during review.

-Peff

#58 lore raw

PATCH v2 10/27 git: refactor alias handling to use a `struct strvec`

In reply to Patrick Steinhardt

In handle_alias() we use both argcp and argv as in-out parameters. Callers mostly pass through the static array from main(), but once we handle an alias we replace it with an allocated array that may contain some allocated strings. Callers do not handle this scenario at all and thus leak memory.

We could in theory handle the lifetime of argv in a hacky fashion by letting callers free it in case they see that an alias was handled. But while that would likely work, we still wouldn't be able to easily handle the lifetime of strings referenced by argv.

Refactor the code to instead use a struct strvec, which effectively removes the need for us to manually track lifetimes.

---
 git.c            | 58 +++++++++++++++++++++++++++++++-------------------------
 t/t0014-alias.sh |  1 +
 2 files changed, 33 insertions(+), 26 deletions(-)
git.c +32 -26
index c2c1b8e22c2d91824ad6d631ea9374424ab53435..88356afe5fb568ccc147f055e3ab253c53a1befa 100644
@@ -362,7 +362,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 	return (*argv) - orig_argv;
 }
 
-static int handle_alias(int *argcp, const char ***argv)
+static int handle_alias(struct strvec *args)
 {
 	int envchanged = 0, ret = 0, saved_errno = errno;
 	int count, option_count;
@@ -370,10 +370,10 @@ static int handle_alias(int *argcp, const char ***argv)
 	const char *alias_command;
 	char *alias_string;
 
-	alias_command = (*argv)[0];
+	alias_command = args->v[0];
 	alias_string = alias_lookup(alias_command);
 	if (alias_string) {
-		if (*argcp > 1 && !strcmp((*argv)[1], "-h"))
+		if (args->nr > 1 && !strcmp(args->v[1], "-h"))
 			fprintf_ln(stderr, _("'%s' is aliased to '%s'"),
 				   alias_command, alias_string);
 		if (alias_string[0] == '!') {
@@ -390,7 +390,7 @@ static int handle_alias(int *argcp, const char ***argv)
 			child.wait_after_clean = 1;
 			child.trace2_child_class = "shell_alias";
 			strvec_push(&child.args, alias_string + 1);
-			strvec_pushv(&child.args, (*argv) + 1);
+			strvec_pushv(&child.args, args->v + 1);
 
 			trace2_cmd_alias(alias_command, child.args.v);
 			trace2_cmd_name("_run_shell_alias_");
@@ -423,15 +423,13 @@ static int handle_alias(int *argcp, const char ***argv)
 		trace_argv_printf(new_argv,
 				  "trace: alias expansion: %s =>",
 				  alias_command);
-
-		REALLOC_ARRAY(new_argv, count + *argcp);
-		/* insert after command name */
-		COPY_ARRAY(new_argv + count, *argv + 1, *argcp);
-
 		trace2_cmd_alias(alias_command, new_argv);
 
-		*argv = new_argv;
-		*argcp += count - 1;
+		/* Replace the alias with the new arguments. */
+		strvec_splice(args, 0, 1, new_argv, count);
+
+		free(alias_string);
+		free(new_argv);
 
 		ret = 1;
 	}
@@ -800,10 +798,10 @@ static void execv_dashed_external(const char **argv)
 		exit(128);
 }
 
-static int run_argv(int *argcp, const char ***argv)
+static int run_argv(struct strvec *args)
 {
 	int done_alias = 0;
-	struct string_list cmd_list = STRING_LIST_INIT_NODUP;
+	struct string_list cmd_list = STRING_LIST_INIT_DUP;
 	struct string_list_item *seen;
 
 	while (1) {
@@ -817,8 +815,8 @@ static int run_argv(int *argcp, const char ***argv)
 		 * process.
 		 */
 		if (!done_alias)
-			handle_builtin(*argcp, *argv);
-		else if (get_builtin(**argv)) {
+			handle_builtin(args->nr, args->v);
+		else if (get_builtin(args->v[0])) {
 			struct child_process cmd = CHILD_PROCESS_INIT;
 			int i;
 
@@ -834,8 +832,8 @@ static int run_argv(int *argcp, const char ***argv)
 			commit_pager_choice();
 
 			strvec_push(&cmd.args, "git");
-			for (i = 0; i < *argcp; i++)
-				strvec_push(&cmd.args, (*argv)[i]);
+			for (i = 0; i < args->nr; i++)
+				strvec_push(&cmd.args, args->v[i]);
 
 			trace_argv_printf(cmd.args.v, "trace: exec:");
 
@@ -850,13 +848,13 @@ static int run_argv(int *argcp, const char ***argv)
 			i = run_command(&cmd);
 			if (i >= 0 || errno != ENOENT)
 				exit(i);
-			die("could not execute builtin %s", **argv);
+			die("could not execute builtin %s", args->v[0]);
 		}
 
 		/* .. then try the external ones */
-		execv_dashed_external(*argv);
+		execv_dashed_external(args->v);
 
-		seen = unsorted_string_list_lookup(&cmd_list, *argv[0]);
+		seen = unsorted_string_list_lookup(&cmd_list, args->v[0]);
 		if (seen) {
 			int i;
 			struct strbuf sb = STRBUF_INIT;
@@ -873,14 +871,14 @@ static int run_argv(int *argcp, const char ***argv)
 			      " not terminate:%s"), cmd_list.items[0].string, sb.buf);
 		}
 
-		string_list_append(&cmd_list, *argv[0]);
+		string_list_append(&cmd_list, args->v[0]);
 
 		/*
 		 * It could be an alias -- this works around the insanity
 		 * of overriding "git log" with "git show" by having
 		 * alias.log = show
 		 */
-		if (!handle_alias(argcp, argv))
+		if (!handle_alias(args))
 			break;
 		done_alias = 1;
 	}
@@ -892,6 +890,7 @@ static int run_argv(int *argcp, const char ***argv)
 
 int cmd_main(int argc, const char **argv)
 {
+	struct strvec args = STRVEC_INIT;
 	const char *cmd;
 	int done_help = 0;
 
@@ -951,25 +950,32 @@ int cmd_main(int argc, const char **argv)
 	 */
 	setup_path();
 
+	for (size_t i = 0; i < argc; i++)
+		strvec_push(&args, argv[i]);
+
 	while (1) {
-		int was_alias = run_argv(&argc, &argv);
+		int was_alias = run_argv(&args);
 		if (errno != ENOENT)
 			break;
 		if (was_alias) {
 			fprintf(stderr, _("expansion of alias '%s' failed; "
 					  "'%s' is not a git command\n"),
-				cmd, argv[0]);
+				cmd, args.v[0]);
+			strvec_clear(&args);
 			exit(1);
 		}
 		if (!done_help) {
-			cmd = argv[0] = help_unknown_cmd(cmd);
+			strvec_replace(&args, 0, help_unknown_cmd(cmd));
+			cmd = args.v[0];
 			done_help = 1;
-		} else
+		} else {
 			break;
+		}
 	}
 
 	fprintf(stderr, _("failed to run command '%s': %s\n"),
 		cmd, strerror(errno));
+	strvec_clear(&args);
 
 	return 1;
 }
t/t0014-alias.sh +1 -0
index 854d59ec58c25ab2cfb58113bf5ea8d670829fe0..2a6f39ad9c81958d5152139995feab57c4371363 100755
@@ -2,6 +2,7 @@
 
 test_description='git command aliasing'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'nested aliases - internal execution' '
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#59 lore raw

PATCH v2 11/27 git: refactor builtin handling to use a `struct strvec`

In reply to Patrick Steinhardt

Similar as with the preceding commit, handle_builtin() does not properly track lifetimes of the argv array and its strings. As it may end up modifying the array this can lead to memory leaks in case it contains allocated strings.

Refactor the function to use a struct strvec instead.

---
 git.c                  | 66 ++++++++++++++++++++++++--------------------------
 t/t0211-trace2-perf.sh |  2 +-
 2 files changed, 32 insertions(+), 36 deletions(-)
git.c +31 -35
index 88356afe5fb568ccc147f055e3ab253c53a1befa..159dd45b08204c4a89d1dc4ab6990978e2454eb6 100644
@@ -696,63 +696,57 @@ void load_builtin_commands(const char *prefix, struct cmdnames *cmds)
 }
 
 #ifdef STRIP_EXTENSION
-static void strip_extension(const char **argv)
+static void strip_extension(struct strvec *args)
 {
 	size_t len;
 
-	if (strip_suffix(argv[0], STRIP_EXTENSION, &len))
-		argv[0] = xmemdupz(argv[0], len);
+	if (strip_suffix(args->v[0], STRIP_EXTENSION, &len)) {
+		char *stripped = xmemdupz(args->v[0], len);
+		strvec_replace(args, 0, stripped);
+		free(stripped);
+	}
 }
 #else
 #define strip_extension(cmd)
 #endif
 
-static void handle_builtin(int argc, const char **argv)
+static void handle_builtin(struct strvec *args)
 {
-	struct strvec args = STRVEC_INIT;
-	const char **argv_copy = NULL;
 	const char *cmd;
 	struct cmd_struct *builtin;
 
-	strip_extension(argv);
-	cmd = argv[0];
+	strip_extension(args);
+	cmd = args->v[0];
 
 	/* Turn "git cmd --help" into "git help --exclude-guides cmd" */
-	if (argc > 1 && !strcmp(argv[1], "--help")) {
-		int i;
-
-		argv[1] = argv[0];
-		argv[0] = cmd = "help";
-
-		for (i = 0; i < argc; i++) {
-			strvec_push(&args, argv[i]);
-			if (!i)
-				strvec_push(&args, "--exclude-guides");
-		}
+	if (args->nr > 1 && !strcmp(args->v[1], "--help")) {
+		const char *exclude_guides_arg[] = { "--exclude-guides" };
+
+		strvec_replace(args, 1, args->v[0]);
+		strvec_replace(args, 0, "help");
+		cmd = "help";
+		strvec_splice(args, 2, 0, exclude_guides_arg,
+			      ARRAY_SIZE(exclude_guides_arg));
+	}
 
-		argc++;
+	builtin = get_builtin(cmd);
+	if (builtin) {
+		const char **argv_copy = NULL;
+		int ret;
 
 		/*
 		 * `run_builtin()` will modify the argv array, so we need to
 		 * create a shallow copy such that we can free all of its
 		 * strings.
 		 */
-		CALLOC_ARRAY(argv_copy, argc + 1);
-		COPY_ARRAY(argv_copy, args.v, argc);
+		if (args->nr)
+			DUP_ARRAY(argv_copy, args->v, args->nr + 1);
 
-		argv = argv_copy;
-	}
-
-	builtin = get_builtin(cmd);
-	if (builtin) {
-		int ret = run_builtin(builtin, argc, argv, the_repository);
-		strvec_clear(&args);
+		ret = run_builtin(builtin, args->nr, argv_copy, the_repository);
+		strvec_clear(args);
 		free(argv_copy);
 		exit(ret);
 	}
-
-	strvec_clear(&args);
-	free(argv_copy);
 }
 
 static void execv_dashed_external(const char **argv)
@@ -815,7 +809,7 @@ static int run_argv(struct strvec *args)
 		 * process.
 		 */
 		if (!done_alias)
-			handle_builtin(args->nr, args->v);
+			handle_builtin(args);
 		else if (get_builtin(args->v[0])) {
 			struct child_process cmd = CHILD_PROCESS_INIT;
 			int i;
@@ -916,8 +910,10 @@ int cmd_main(int argc, const char **argv)
 	 * that one cannot handle it.
 	 */
 	if (skip_prefix(cmd, "git-", &cmd)) {
-		argv[0] = cmd;
-		handle_builtin(argc, argv);
+		strvec_push(&args, cmd);
+		strvec_pushv(&args, argv + 1);
+		handle_builtin(&args);
+		strvec_clear(&args);
 		die(_("cannot handle %s as a builtin"), cmd);
 	}
 
t/t0211-trace2-perf.sh +1 -1
index dddc130560ba6150fc5f5eac36c65ff76a2d31a1..91260ce97e5bdb39550a9e1e4abbc4d5fea48a21 100755
@@ -2,7 +2,7 @@
 
 test_description='test trace2 facility (perf target)'
 
-TEST_PASSES_SANITIZE_LEAK=false
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty
#60 lore raw

Re: [PATCH v2 11/27] git: refactor builtin handling to use a `struct strvec`

Quoted 95 lines · Patrick Steinhardt

Similar as with the preceding commit, handle_builtin() does not properly track lifetimes of the argv array and its strings. As it may end up modifying the array this can lead to memory leaks in case it contains allocated strings.

Refactor the function to use a struct strvec instead.

---
 git.c                  | 66 ++++++++++++++++++++++++--------------------------
 t/t0211-trace2-perf.sh |  2 +-
 2 files changed, 32 insertions(+), 36 deletions(-)
git.c +24 -28
index 88356afe5fb568ccc147f055e3ab253c53a1befa..159dd45b08204c4a89d1dc4ab6990978e2454eb6 100644
@@ -696,63 +696,57 @@ void load_builtin_commands(const char *prefix, struct cmdnames *cmds)
 }
 
 #ifdef STRIP_EXTENSION
-static void strip_extension(const char **argv)
+static void strip_extension(struct strvec *args)
 {
 	size_t len;
 
-	if (strip_suffix(argv[0], STRIP_EXTENSION, &len))
-		argv[0] = xmemdupz(argv[0], len);
+	if (strip_suffix(args->v[0], STRIP_EXTENSION, &len)) {
+		char *stripped = xmemdupz(args->v[0], len);
+		strvec_replace(args, 0, stripped);
+		free(stripped);
+	}
 }
 #else
 #define strip_extension(cmd)
 #endif
 
-static void handle_builtin(int argc, const char **argv)
+static void handle_builtin(struct strvec *args)
 {
-	struct strvec args = STRVEC_INIT;
-	const char **argv_copy = NULL;
 	const char *cmd;
 	struct cmd_struct *builtin;
 
-	strip_extension(argv);
-	cmd = argv[0];
+	strip_extension(args);
+	cmd = args->v[0];
 
 	/* Turn "git cmd --help" into "git help --exclude-guides cmd" */
-	if (argc > 1 && !strcmp(argv[1], "--help")) {
-		int i;
-
-		argv[1] = argv[0];
-		argv[0] = cmd = "help";
-
-		for (i = 0; i < argc; i++) {
-			strvec_push(&args, argv[i]);
-			if (!i)
-				strvec_push(&args, "--exclude-guides");
-		}
+	if (args->nr > 1 && !strcmp(args->v[1], "--help")) {
+		const char *exclude_guides_arg[] = { "--exclude-guides" };
+
+		strvec_replace(args, 1, args->v[0]);
+		strvec_replace(args, 0, "help");
+		cmd = "help";
+		strvec_splice(args, 2, 0, exclude_guides_arg,
+			      ARRAY_SIZE(exclude_guides_arg));
+	}
 
-		argc++;
+	builtin = get_builtin(cmd);
+	if (builtin) {
+		const char **argv_copy = NULL;
+		int ret;
 
 		/*
 		 * `run_builtin()` will modify the argv array, so we need to
 		 * create a shallow copy such that we can free all of its
 		 * strings.
 		 */
-		CALLOC_ARRAY(argv_copy, argc + 1);
-		COPY_ARRAY(argv_copy, args.v, argc);
+		if (args->nr)
+			DUP_ARRAY(argv_copy, args->v, args->nr + 1);
 
-		argv = argv_copy;
-	}
-
-	builtin = get_builtin(cmd);
-	if (builtin) {
-		int ret = run_builtin(builtin, argc, argv, the_repository);

git.c void load_builtin_commands(const char *prefix, struct cmdnames *cmds) · line 750

Quoted 10 lines
git.c +2 -4
-		strvec_clear(&args);
+		ret = run_builtin(builtin, args->nr, argv_copy, the_repository);
+		strvec_clear(args);
 		free(argv_copy);
 		exit(ret);
 	}
-
-	strvec_clear(&args);
-	free(argv_copy);
 }

Just want to give you a little shout out how you've reorganized the code and it now makes a lot more sense how argv_copy is used by putting it inside the if (builtin) code block.

Signature · 1 line
Toon
#61 lore raw

PATCH v2 12/27 split-index: fix memory leak in `move_cache_to_base_index()`

In reply to Patrick Steinhardt

In move_cache_to_base_index() we move the index cache of the main index into the split index, which is used when writing a shared index. But we don't release the old split index base in case we already had a split index before this operation, which can thus leak memory.

Plug the leak by releasing the previous base.

---
 split-index.c          | 6 +++++-
 t/t1700-split-index.sh | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)
split-index.c +5 -1
index 120c8190b187bc8c6c73630f06f5dd4dc994df30..cfbc773e6cd3b11ea5f47ab92310a56c30f6971c 100644
@@ -97,7 +97,11 @@ void move_cache_to_base_index(struct index_state *istate)
 		mem_pool_combine(istate->ce_mem_pool, istate->split_index->base->ce_mem_pool);
 	}
 
-	ALLOC_ARRAY(si->base, 1);
+	if (si->base)
+		release_index(si->base);
+	else
+		ALLOC_ARRAY(si->base, 1);
+
 	index_state_init(si->base, istate->repo);
 	si->base->version = istate->version;
 	/* zero timestamp disables racy test in ce_write_index() */
t/t1700-split-index.sh +1 -0
index ac4a5b2734c0784c2cb8878112a5ead9593860de..2625ac44889a5c9219e9575a9bbc5265d3c419d5 100755
@@ -5,6 +5,7 @@ test_description='split index mode tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # We need total control of index splitting here
Signature · 1 line
2.47.0.229.g8f8d6eee53.dirty