mirror of
https://github.com/git/git.git
synced 2024-10-28 04:49:43 +01:00
cc395d6b47
The function `unique_tracking_name()` returns an allocated string, but does not clearly indicate this because its return type is `const char *` instead of `char *`. This has led to various callsites where we never free its returned memory at all, which causes memory leaks. Plug those leaks and mark now-passing tests as leak free. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
23 lines
518 B
Bash
Executable file
23 lines
518 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='merge can handle submodules'
|
|
|
|
TEST_PASSES_SANITIZE_LEAK=true
|
|
. ./test-lib.sh
|
|
. "$TEST_DIRECTORY"/lib-submodule-update.sh
|
|
|
|
# merges without conflicts
|
|
test_submodule_switch "merge"
|
|
|
|
test_submodule_switch "merge --ff"
|
|
|
|
test_submodule_switch "merge --ff-only"
|
|
|
|
if test "$GIT_TEST_MERGE_ALGORITHM" != ort
|
|
then
|
|
KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
|
|
KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
|
|
fi
|
|
test_submodule_switch "merge --no-ff"
|
|
|
|
test_done
|