checkout: fix "branch info" memory leaks

The "checkout" command is one of the main sources of leaks in the test suite, let's fix the common ones by not leaking from the "struct branch_info". Doing this is rather straightforward, albeit verbose, we need to xstrdup() constant strings going into the struct, and free() the ones we clobber as we go along. This also means that we can delete previous partial leak fixes in this area, i.e. the "path_to_free" accounting added by 96ec7b1e708 (Convert resolve_ref+xstrdup to new resolve_refdup function, 2011-12-13). There was some discussion about whether "we should retain the "const char *" here and cast at free() time, or have it be a "char *". Since this is not a public API with any sort of API boundary let's use "char *", as is already being done for the "refname" member of the same struct. The tests to mark as passing were found with: rm .prove; GIT_SKIP_TESTS=t0027 prove -j8 --state=save t[0-9]*.sh :: --immediate # apply & compile this change prove -j8 --state=failed :: --immediate I.e. the ones that were newly passing when the --state=failed command was run. I left out "t3040-subprojects-basic.sh" and "t4131-apply-fake-ancestor.sh" to to optimization-level related differences similar to the ones noted in[1], except that these would be something the current 'linux-leaks' job would run into. 1. https://lore.kernel.org/git/cover-v3-0.6-00000000000-20211022T175227Z-avarab@gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Nov 16, 2021 at 19:27 UTC 9081a421a6dbeeda637df8edb0ebf0da11a05b69
36 files changed +98 -31
builtin/checkout.c
+55 -31
@@ -91,8 +91,8 @@ struct checkout_opts {
91 };
92
93 struct branch_info {
94 - const char *name; /* The short name used */
95 - const char *path; /* The full name of a real branch */
94 + char *name; /* The short name used */
95 + char *path; /* The full name of a real branch */
96 struct commit *commit; /* The named commit */
97 char *refname; /* The full name of the ref being checked out. */
98 struct object_id oid; /* The object ID of the commit being checked out. */
@@ -103,6 +103,14 @@ struct branch_info {
103 char *checkout;
104 };
105
106 +static void branch_info_release(struct branch_info *info)
107 +{
108 + free(info->name);
109 + free(info->path);
110 + free(info->refname);
111 + free(info->checkout);
112 +}
113 +
114 static int post_checkout_hook(struct commit *old_commit, struct commit *new_commit,
115 int changed)
116 {
@@ -688,9 +696,12 @@ static void setup_branch_path(struct branch_info *branch)
696 repo_get_oid_committish(the_repository, branch->name, &branch->oid);
697
698 strbuf_branchname(&buf, branch->name, INTERPRET_BRANCH_LOCAL);
691 - if (strcmp(buf.buf, branch->name))
699 + if (strcmp(buf.buf, branch->name)) {
700 + free(branch->name);
701 branch->name = xstrdup(buf.buf);
702 + }
703 strbuf_splice(&buf, 0, 0, "refs/heads/", 11);
704 + free(branch->path);
705 branch->path = strbuf_detach(&buf, NULL);
706 }
707
@@ -894,7 +905,9 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
905 opts->new_branch_log,
906 opts->quiet,
907 opts->track);
897 - new_branch_info->name = opts->new_branch;
908 + free(new_branch_info->name);
909 + free(new_branch_info->refname);
910 + new_branch_info->name = xstrdup(opts->new_branch);
911 setup_branch_path(new_branch_info);
912 }
913
@@ -1062,8 +1075,7 @@ static int switch_branches(const struct checkout_opts *opts,
1075 struct branch_info *new_branch_info)
1076 {
1077 int ret = 0;
1065 - struct branch_info old_branch_info;
1066 - void *path_to_free;
1078 + struct branch_info old_branch_info = { 0 };
1079 struct object_id rev;
1080 int flag, writeout_error = 0;
1081 int do_merge = 1;
@@ -1071,25 +1083,32 @@ static int switch_branches(const struct checkout_opts *opts,
1083 trace2_cmd_mode("branch");
1084
1085 memset(&old_branch_info, 0, sizeof(old_branch_info));
1074 - old_branch_info.path = path_to_free = resolve_refdup("HEAD", 0, &rev, &flag);
1086 + old_branch_info.path = resolve_refdup("HEAD", 0, &rev, &flag);
1087 if (old_branch_info.path)
1088 old_branch_info.commit = lookup_commit_reference_gently(the_repository, &rev, 1);
1089 if (!(flag & REF_ISSYMREF))
1078 - old_branch_info.path = NULL;
1090 + FREE_AND_NULL(old_branch_info.path);
1091
1080 - if (old_branch_info.path)
1081 - skip_prefix(old_branch_info.path, "refs/heads/", &old_branch_info.name);
1092 + if (old_branch_info.path) {
1093 + const char *const prefix = "refs/heads/";
1094 + const char *p;
1095 + if (skip_prefix(old_branch_info.path, prefix, &p))
1096 + old_branch_info.name = xstrdup(p);
1097 + else
1098 + BUG("should be able to skip past '%s' in '%s'!",
1099 + prefix, old_branch_info.path);
1100 + }
1101
1102 if (opts->new_orphan_branch && opts->orphan_from_empty_tree) {
1103 if (new_branch_info->name)
1104 BUG("'switch --orphan' should never accept a commit as starting point");
1105 new_branch_info->commit = NULL;
1087 - new_branch_info->name = "(empty)";
1106 + new_branch_info->name = xstrdup("(empty)");
1107 do_merge = 1;
1108 }
1109
1110 if (!new_branch_info->name) {
1092 - new_branch_info->name = "HEAD";
1111 + new_branch_info->name = xstrdup("HEAD");
1112 new_branch_info->commit = old_branch_info.commit;
1113 if (!new_branch_info->commit)
1114 die(_("You are on a branch yet to be born"));
@@ -1102,7 +1121,7 @@ static int switch_branches(const struct checkout_opts *opts,
1121 if (do_merge) {
1122 ret = merge_working_tree(opts, &old_branch_info, new_branch_info, &writeout_error);
1123 if (ret) {
1105 - free(path_to_free);
1124 + branch_info_release(&old_branch_info);
1125 return ret;
1126 }
1127 }
@@ -1113,7 +1132,8 @@ static int switch_branches(const struct checkout_opts *opts,
1132 update_refs_for_switch(opts, &old_branch_info, new_branch_info);
1133
1134 ret = post_checkout_hook(old_branch_info.commit, new_branch_info->commit, 1);
1116 - free(path_to_free);
1135 + branch_info_release(&old_branch_info);
1136 +
1137 return ret || writeout_error;
1138 }
1139
@@ -1145,16 +1165,15 @@ static void setup_new_branch_info_and_source_tree(
1165 struct tree **source_tree = &opts->source_tree;
1166 struct object_id branch_rev;
1167
1148 - new_branch_info->name = arg;
1168 + new_branch_info->name = xstrdup(arg);
1169 setup_branch_path(new_branch_info);
1170
1171 if (!check_refname_format(new_branch_info->path, 0) &&
1172 !read_ref(new_branch_info->path, &branch_rev))
1173 oidcpy(rev, &branch_rev);
1154 - else {
1155 - free((char *)new_branch_info->path);
1156 - new_branch_info->path = NULL; /* not an existing branch */
1157 - }
1174 + else
1175 + /* not an existing branch */
1176 + FREE_AND_NULL(new_branch_info->path);
1177
1178 new_branch_info->commit = lookup_commit_reference_gently(the_repository, rev, 1);
1179 if (!new_branch_info->commit) {
@@ -1574,12 +1593,11 @@ static char cb_option = 'b';
1593
1594 static int checkout_main(int argc, const char **argv, const char *prefix,
1595 struct checkout_opts *opts, struct option *options,
1577 - const char * const usagestr[])
1596 + const char * const usagestr[],
1597 + struct branch_info *new_branch_info)
1598 {
1579 - struct branch_info new_branch_info;
1599 int parseopt_flags = 0;
1600
1582 - memset(&new_branch_info, 0, sizeof(new_branch_info));
1601 opts->overwrite_ignore = 1;
1602 opts->prefix = prefix;
1603 opts->show_progress = -1;
@@ -1688,7 +1706,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
1706 opts->track == BRANCH_TRACK_UNSPECIFIED &&
1707 !opts->new_branch;
1708 int n = parse_branchname_arg(argc, argv, dwim_ok,
1691 - &new_branch_info, opts, &rev);
1709 + new_branch_info, opts, &rev);
1710 argv += n;
1711 argc -= n;
1712 } else if (!opts->accept_ref && opts->from_treeish) {
@@ -1697,7 +1715,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
1715 if (get_oid_mb(opts->from_treeish, &rev))
1716 die(_("could not resolve %s"), opts->from_treeish);
1717
1700 - setup_new_branch_info_and_source_tree(&new_branch_info,
1718 + setup_new_branch_info_and_source_tree(new_branch_info,
1719 opts, &rev,
1720 opts->from_treeish);
1721
@@ -1717,7 +1735,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
1735 * Try to give more helpful suggestion.
1736 * new_branch && argc > 1 will be caught later.
1737 */
1720 - if (opts->new_branch && argc == 1 && !new_branch_info.commit)
1738 + if (opts->new_branch && argc == 1 && !new_branch_info->commit)
1739 die(_("'%s' is not a commit and a branch '%s' cannot be created from it"),
1740 argv[0], opts->new_branch);
1741
@@ -1766,11 +1784,10 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
1784 strbuf_release(&buf);
1785 }
1786
1769 - UNLEAK(opts);
1787 if (opts->patch_mode || opts->pathspec.nr)
1771 - return checkout_paths(opts, &new_branch_info);
1788 + return checkout_paths(opts, new_branch_info);
1789 else
1773 - return checkout_branch(opts, &new_branch_info);
1790 + return checkout_branch(opts, new_branch_info);
1791 }
1792
1793 int cmd_checkout(int argc, const char **argv, const char *prefix)
@@ -1789,6 +1806,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
1806 OPT_END()
1807 };
1808 int ret;
1809 + struct branch_info new_branch_info = { 0 };
1810
1811 memset(&opts, 0, sizeof(opts));
1812 opts.dwim_new_local_branch = 1;
@@ -1819,7 +1837,9 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
1837 options = add_checkout_path_options(&opts, options);
1838
1839 ret = checkout_main(argc, argv, prefix, &opts,
1822 - options, checkout_usage);
1840 + options, checkout_usage, &new_branch_info);
1841 + branch_info_release(&new_branch_info);
1842 + clear_pathspec(&opts.pathspec);
1843 FREE_AND_NULL(options);
1844 return ret;
1845 }
@@ -1840,6 +1860,7 @@ int cmd_switch(int argc, const char **argv, const char *prefix)
1860 OPT_END()
1861 };
1862 int ret;
1863 + struct branch_info new_branch_info = { 0 };
1864
1865 memset(&opts, 0, sizeof(opts));
1866 opts.dwim_new_local_branch = 1;
@@ -1859,7 +1880,8 @@ int cmd_switch(int argc, const char **argv, const char *prefix)
1880 cb_option = 'c';
1881
1882 ret = checkout_main(argc, argv, prefix, &opts,
1862 - options, switch_branch_usage);
1883 + options, switch_branch_usage, &new_branch_info);
1884 + branch_info_release(&new_branch_info);
1885 FREE_AND_NULL(options);
1886 return ret;
1887 }
@@ -1881,6 +1903,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)
1903 OPT_END()
1904 };
1905 int ret;
1906 + struct branch_info new_branch_info = { 0 };
1907
1908 memset(&opts, 0, sizeof(opts));
1909 opts.accept_ref = 0;
@@ -1896,7 +1919,8 @@ int cmd_restore(int argc, const char **argv, const char *prefix)
1919 options = add_checkout_path_options(&opts, options);
1920
1921 ret = checkout_main(argc, argv, prefix, &opts,
1899 - options, restore_usage);
1922 + options, restore_usage, &new_branch_info);
1923 + branch_info_release(&new_branch_info);
1924 FREE_AND_NULL(options);
1925 return ret;
1926 }
t/t0020-crlf.sh
+1
@@ -5,6 +5,7 @@ test_description='CRLF conversion'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 has_cr() {
t/t1005-read-tree-reset.sh
+1
@@ -2,6 +2,7 @@
2
3 test_description='read-tree -u --reset'
4
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7 . "$TEST_DIRECTORY"/lib-read-tree.sh
8
t/t1008-read-tree-overlay.sh
+1
@@ -5,6 +5,7 @@ test_description='test multi-tree read-tree without merging'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10 . "$TEST_DIRECTORY"/lib-read-tree.sh
11
t/t1403-show-ref.sh
+1
@@ -4,6 +4,7 @@ test_description='show-ref'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 test_expect_success setup '
t/t1406-submodule-ref-store.sh
+1
@@ -5,6 +5,7 @@ test_description='test submodule ref store api'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 RUN="test-tool ref-store submodule:sub"
t/t1505-rev-parse-last.sh
+1
@@ -5,6 +5,7 @@ test_description='test @{-N} syntax'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11
t/t2007-checkout-symlink.sh
+1
@@ -7,6 +7,7 @@ test_description='git checkout to switch between branches with symlink<->dir'
7 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
8 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
9
10 +TEST_PASSES_SANITIZE_LEAK=true
11 . ./test-lib.sh
12
13 test_expect_success setup '
t/t2008-checkout-subdir.sh
+1
@@ -4,6 +4,7 @@
4
5 test_description='git checkout from subdirectories'
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 test_expect_success setup '
t/t2009-checkout-statinfo.sh
+1
@@ -5,6 +5,7 @@ test_description='checkout should leave clean stat info'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 test_expect_success 'setup' '
t/t2010-checkout-ambiguous.sh
+1
@@ -5,6 +5,7 @@ test_description='checkout and pathspecs/refspecs ambiguities'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 test_expect_success 'setup' '
t/t2011-checkout-invalid-head.sh
+1
@@ -5,6 +5,7 @@ test_description='checkout switching away from an invalid branch'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 test_expect_success 'setup' '
t/t2014-checkout-switch.sh
+2
@@ -1,6 +1,8 @@
1 #!/bin/sh
2
3 test_description='Peter MacMillan'
4 +
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 test_expect_success setup '
t/t2017-checkout-orphan.sh
+1
@@ -10,6 +10,7 @@ Main Tests for --orphan functionality.'
10 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
11 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
12
13 +TEST_PASSES_SANITIZE_LEAK=true
14 . ./test-lib.sh
15
16 TEST_FILE=foo
t/t2019-checkout-ambiguous-ref.sh
+2
@@ -1,6 +1,8 @@
1 #!/bin/sh
2
3 test_description='checkout handling of ambiguous (branch/tag) refs'
4 +
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 test_expect_success 'setup ambiguous refs' '
t/t2021-checkout-overwrite.sh
+2
@@ -1,6 +1,8 @@
1 #!/bin/sh
2
3 test_description='checkout must not overwrite an untracked objects'
4 +
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 test_expect_success 'setup' '
t/t2022-checkout-paths.sh
+1
@@ -4,6 +4,7 @@ test_description='checkout $tree -- $paths'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 test_expect_success setup '
t/t2026-checkout-pathspec-file.sh
+1
@@ -2,6 +2,7 @@
2
3 test_description='checkout --pathspec-from-file'
4
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 test_tick
t/t2106-update-index-assume-unchanged.sh
+1
@@ -3,6 +3,7 @@
3 test_description='git update-index --assume-unchanged test.
4 '
5
6 +TEST_PASSES_SANITIZE_LEAK=true
7 . ./test-lib.sh
8
9 test_expect_success 'setup' '
t/t3040-subprojects-basic.sh
+2
@@ -1,6 +1,8 @@
1 #!/bin/sh
2
3 test_description='Basic subproject functionality'
4 +
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 test_expect_success 'setup: create superproject' '
t/t3305-notes-fanout.sh
+1
@@ -2,6 +2,7 @@
2
3 test_description='Test that adding/removing many notes triggers automatic fanout restructuring'
4
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 path_has_fanout() {
t/t3422-rebase-incompatible-options.sh
+2
@@ -1,6 +1,8 @@
1 #!/bin/sh
2
3 test_description='test if rebase detects and aborts on incompatible options'
4 +
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 test_expect_success 'setup' '
t/t4115-apply-symlink.sh
+1
@@ -7,6 +7,7 @@ test_description='git apply symlinks and partial files
7
8 '
9
10 +TEST_PASSES_SANITIZE_LEAK=true
11 . ./test-lib.sh
12
13 test_expect_success setup '
t/t4121-apply-diffs.sh
+1
@@ -4,6 +4,7 @@ test_description='git apply for contextually independent diffs'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 echo '1
t/t4204-patch-id.sh
+1
@@ -5,6 +5,7 @@ test_description='git patch-id'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 test_expect_success 'setup' '
t/t5410-receive-pack-alternates.sh
+1
@@ -5,6 +5,7 @@ test_description='git receive-pack with alternate ref filtering'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 test_expect_success 'setup' '
t/t5609-clone-branch.sh
+1
@@ -4,6 +4,7 @@ test_description='clone --branch option'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 check_HEAD() {
t/t6407-merge-binary.sh
+1
@@ -5,6 +5,7 @@ test_description='ask merge-recursive to merge binary files'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 test_expect_success setup '
t/t6414-merge-rename-nocruft.sh
+1
@@ -4,6 +4,7 @@ test_description='Merge-recursive merging renames'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 test_expect_success 'setup' '
t/t7113-post-index-change-hook.sh
+1
@@ -5,6 +5,7 @@ test_description='post index change hook'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 test_expect_success 'setup' '
t/t7509-commit-authorship.sh
+1
@@ -5,6 +5,7 @@
5
6 test_description='commit tests of various authorhip options. '
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 author_header () {
t/t7815-grep-binary.sh
+1
@@ -2,6 +2,7 @@
2
3 test_description='git grep in binary files'
4
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 test_expect_success 'setup' "
t/t9102-git-svn-deep-rmdir.sh
+2
@@ -1,5 +1,7 @@
1 #!/bin/sh
2 test_description='git svn rmdir'
3 +
4 +TEST_PASSES_SANITIZE_LEAK=true
5 . ./lib-git-svn.sh
6
7 test_expect_success 'initialize repo' '
t/t9123-git-svn-rebuild-with-rewriteroot.sh
+1
@@ -5,6 +5,7 @@
5
6 test_description='git svn respects rewriteRoot during rebuild'
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./lib-git-svn.sh
10
11 mkdir import
t/t9128-git-svn-cmd-branch.sh
+2
@@ -4,6 +4,8 @@
4 #
5
6 test_description='git svn partial-rebuild tests'
7 +
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./lib-git-svn.sh
10
11 test_expect_success 'initialize svnrepo' '
t/t9167-git-svn-cmd-branch-subproject.sh
+2
@@ -4,6 +4,8 @@
4 #
5
6 test_description='git svn branch for subproject clones'
7 +
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./lib-git-svn.sh
10
11 test_expect_success 'initialize svnrepo' '