summaryrefslogtreecommitdiff
path: root/t/t6422-merge-rename-corner-cases.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t6422-merge-rename-corner-cases.sh')
-rwxr-xr-xt/t6422-merge-rename-corner-cases.sh57
1 files changed, 28 insertions, 29 deletions
diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh
index bf4ce3c..80d7b5e 100755
--- a/t/t6422-merge-rename-corner-cases.sh
+++ b/t/t6422-merge-rename-corner-cases.sh
@@ -6,11 +6,12 @@ test_description="recursive merge corner cases w/ renames but not criss-crosses"
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-merge.sh
test_setup_rename_delete_untracked () {
- test_create_repo rename-delete-untracked &&
+ git init rename-delete-untracked &&
(
cd rename-delete-untracked &&
@@ -55,7 +56,7 @@ test_expect_success "Does git preserve Gollum's precious artifact?" '
# We should be able to merge B & C cleanly
test_setup_rename_modify_add_source () {
- test_create_repo rename-modify-add-source &&
+ git init rename-modify-add-source &&
(
cd rename-modify-add-source &&
@@ -95,7 +96,7 @@ test_expect_failure 'rename/modify/add-source conflict resolvable' '
'
test_setup_break_detection_1 () {
- test_create_repo break-detection-1 &&
+ git init break-detection-1 &&
(
cd break-detection-1 &&
@@ -143,7 +144,7 @@ test_expect_failure 'conflict caused if rename not detected' '
'
test_setup_break_detection_2 () {
- test_create_repo break-detection-2 &&
+ git init break-detection-2 &&
(
cd break-detection-2 &&
@@ -191,7 +192,7 @@ test_expect_failure 'missed conflict if rename not detected' '
# Commit C: rename a->b, add unrelated a
test_setup_break_detection_3 () {
- test_create_repo break-detection-3 &&
+ git init break-detection-3 &&
(
cd break-detection-3 &&
@@ -267,7 +268,7 @@ test_expect_failure 'detect rename/add-source and preserve all data, merge other
'
test_setup_rename_directory () {
- test_create_repo rename-directory-$1 &&
+ git init rename-directory-$1 &&
(
cd rename-directory-$1 &&
@@ -385,7 +386,7 @@ test_expect_success 'rename/directory conflict + content merge conflict' '
'
test_setup_rename_directory_2 () {
- test_create_repo rename-directory-2 &&
+ git init rename-directory-2 &&
(
cd rename-directory-2 &&
@@ -444,7 +445,7 @@ test_expect_success 'disappearing dir in rename/directory conflict handled' '
# Commit B: modify a, add different b
test_setup_rename_with_content_merge_and_add () {
- test_create_repo rename-with-content-merge-and-add-$1 &&
+ git init rename-with-content-merge-and-add-$1 &&
(
cd rename-with-content-merge-and-add-$1 &&
@@ -475,7 +476,7 @@ test_expect_success 'handle rename-with-content-merge vs. add' '
git checkout A^0 &&
test_must_fail git merge -s recursive B^0 >out &&
- test_i18ngrep "CONFLICT (.*/add)" out &&
+ test_grep "CONFLICT (.*/add)" out &&
git ls-files -s >out &&
test_line_count = 2 out &&
@@ -521,7 +522,7 @@ test_expect_success 'handle rename-with-content-merge vs. add, merge other way'
git checkout B^0 &&
test_must_fail git merge -s recursive A^0 >out &&
- test_i18ngrep "CONFLICT (.*/add)" out &&
+ test_grep "CONFLICT (.*/add)" out &&
git ls-files -s >out &&
test_line_count = 2 out &&
@@ -569,7 +570,7 @@ test_expect_success 'handle rename-with-content-merge vs. add, merge other way'
# * Nothing else should be present. Is anything?
test_setup_rename_rename_2to1 () {
- test_create_repo rename-rename-2to1 &&
+ git init rename-rename-2to1 &&
(
cd rename-rename-2to1 &&
@@ -601,7 +602,7 @@ test_expect_success 'handle rename/rename (2to1) conflict correctly' '
git checkout B^0 &&
test_must_fail git merge -s recursive C^0 >out &&
- test_i18ngrep "CONFLICT (\(.*\)/\1)" out &&
+ test_grep "CONFLICT (\(.*\)/\1)" out &&
git ls-files -s >out &&
test_line_count = 2 out &&
@@ -641,7 +642,7 @@ test_expect_success 'handle rename/rename (2to1) conflict correctly' '
# Commit B: rename a->b
# Commit C: rename a->c
test_setup_rename_rename_1to2 () {
- test_create_repo rename-rename-1to2 &&
+ git init rename-rename-1to2 &&
(
cd rename-rename-1to2 &&
@@ -699,7 +700,7 @@ test_expect_success 'merge has correct working tree contents' '
# Merging of B & C should NOT be clean; there's a rename/rename conflict
test_setup_rename_rename_1to2_add_source_1 () {
- test_create_repo rename-rename-1to2-add-source-1 &&
+ git init rename-rename-1to2-add-source-1 &&
(
cd rename-rename-1to2-add-source-1 &&
@@ -747,7 +748,7 @@ test_expect_failure 'detect conflict with rename/rename(1to2)/add-source merge'
'
test_setup_rename_rename_1to2_add_source_2 () {
- test_create_repo rename-rename-1to2-add-source-2 &&
+ git init rename-rename-1to2-add-source-2 &&
(
cd rename-rename-1to2-add-source-2 &&
@@ -793,7 +794,7 @@ test_expect_failure 'rename/rename/add-source still tracks new a file' '
'
test_setup_rename_rename_1to2_add_dest () {
- test_create_repo rename-rename-1to2-add-dest &&
+ git init rename-rename-1to2-add-dest &&
(
cd rename-rename-1to2-add-dest &&
@@ -873,7 +874,7 @@ test_expect_success 'rename/rename/add-dest merge still knows about conflicting
# Expected: CONFLICT (rename/add/delete), two-way merged bar
test_setup_rad () {
- test_create_repo rad &&
+ git init rad &&
(
cd rad &&
echo "original file" >foo &&
@@ -913,8 +914,8 @@ test_expect_merge_algorithm failure success 'rad-check: rename/add/delete confli
# be flexible in the type of console output message(s) reported
# for this particular case; we will be more stringent about the
# contents of the index and working directory.
- test_i18ngrep "CONFLICT (.*/add)" out &&
- test_i18ngrep "CONFLICT (rename.*/delete)" out &&
+ test_grep "CONFLICT (.*/add)" out &&
+ test_grep "CONFLICT (rename.*/delete)" out &&
test_must_be_empty err &&
git ls-files -s >file_count &&
@@ -945,7 +946,7 @@ test_expect_merge_algorithm failure success 'rad-check: rename/add/delete confli
# Expected: CONFLICT (rename/rename/delete/delete), two-way merged baz
test_setup_rrdd () {
- test_create_repo rrdd &&
+ git init rrdd &&
(
cd rrdd &&
echo foo >foo &&
@@ -987,8 +988,8 @@ test_expect_merge_algorithm failure success 'rrdd-check: rename/rename(2to1)/del
# be flexible in the type of console output message(s) reported
# for this particular case; we will be more stringent about the
# contents of the index and working directory.
- test_i18ngrep "CONFLICT (\(.*\)/\1)" out &&
- test_i18ngrep "CONFLICT (rename.*delete)" out &&
+ test_grep "CONFLICT (\(.*\)/\1)" out &&
+ test_grep "CONFLICT (rename.*delete)" out &&
test_must_be_empty err &&
git ls-files -s >file_count &&
@@ -1021,7 +1022,7 @@ test_expect_merge_algorithm failure success 'rrdd-check: rename/rename(2to1)/del
# multi-way merged contents found in two, four, six
test_setup_mod6 () {
- test_create_repo mod6 &&
+ git init mod6 &&
(
cd mod6 &&
test_seq 11 19 >one &&
@@ -1067,7 +1068,7 @@ test_expect_merge_algorithm failure success 'mod6-check: chains of rename/rename
test_must_fail git merge -s recursive B^0 >out 2>err &&
- test_i18ngrep "CONFLICT (rename/rename)" out &&
+ test_grep "CONFLICT (rename/rename)" out &&
test_must_be_empty err &&
git ls-files -s >file_count &&
@@ -1158,8 +1159,7 @@ test_conflicts_with_adds_and_renames() {
# 4) There should not be any three~* files in the working
# tree
test_setup_collision_conflict () {
- #test_expect_success "setup simple $sideL/$sideR conflict" '
- test_create_repo simple_${sideL}_${sideR} &&
+ git init simple_${sideL}_${sideR} &&
(
cd simple_${sideL}_${sideR} &&
@@ -1235,7 +1235,6 @@ test_conflicts_with_adds_and_renames() {
fi &&
test_tick && git commit -m R
)
- #'
}
test_expect_success "check simple $sideL/$sideR conflict" '
@@ -1307,7 +1306,7 @@ test_conflicts_with_adds_and_renames add add
# So, we have four different conflicting files that all end up at path
# 'three'.
test_setup_nested_conflicts_from_rename_rename () {
- test_create_repo nested_conflicts_from_rename_rename &&
+ git init nested_conflicts_from_rename_rename &&
(
cd nested_conflicts_from_rename_rename &&
@@ -1416,7 +1415,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '
# Expected: CONFLICT(rename/rename) message, three unstaged entries in the
# index, and contents of orig-[AB] at path orig-[AB]
test_setup_rename_rename_1_to_2_binary () {
- test_create_repo rename_rename_1_to_2_binary &&
+ git init rename_rename_1_to_2_binary &&
(
cd rename_rename_1_to_2_binary &&