aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-path-utils.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2024-03-31 00:22:41 +0100
committerJohannes Schindelin <johannes.schindelin@gmx.de>2024-04-19 12:38:29 +0200
commit2b3d38a6b12ffc949c98eaacd67e8e383c847529 (patch)
treeb8c29bc2c4fdf4a1bcf34a1acdde2e429168724c /t/helper/test-path-utils.c
parent86cb6a3f059968d031fdf6ed49ab38a7ae00847f (diff)
parenta33fea0886cfa016d313d2bd66bdd08615bffbc9 (diff)
downloadgit-2b3d38a6b12ffc949c98eaacd67e8e383c847529.tar.gz
Merge branch 'defense-in-depth'
This topic branch adds a couple of measures designed to make it much harder to exploit any bugs in Git's recursive clone machinery that might be found in the future. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 't/helper/test-path-utils.c')
-rw-r--r--t/helper/test-path-utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/helper/test-path-utils.c b/t/helper/test-path-utils.c
index f69709d674..0e0de21807 100644
--- a/t/helper/test-path-utils.c
+++ b/t/helper/test-path-utils.c
@@ -495,6 +495,16 @@ int cmd__path_utils(int argc, const char **argv)
return !!res;
}
+ if (argc == 4 && !strcmp(argv[1], "do_files_match")) {
+ int ret = do_files_match(argv[2], argv[3]);
+
+ if (ret)
+ printf("equal\n");
+ else
+ printf("different\n");
+ return !ret;
+ }
+
fprintf(stderr, "%s: unknown function name: %s\n", argv[0],
argv[1] ? argv[1] : "(there was none)");
return 1;