summaryrefslogtreecommitdiff
path: root/t/t6418-merge-text-auto.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2022-01-10 11:52:55 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-01-10 11:52:55 -0800
commit2c5410480ea7ea92e39667fedc8eba1f7a95bc9e (patch)
tree5596e9549e0ce5730a2b74f87be407d55b2dd249 /t/t6418-merge-text-auto.sh
parentMerge branch 'jc/doc-submitting-patches-choice-of-base' (diff)
parentmerge-ort: fix bug with renormalization and rename/delete conflicts (diff)
downloadtgif-2c5410480ea7ea92e39667fedc8eba1f7a95bc9e.tar.xz
Merge branch 'en/merge-ort-renorm-with-rename-delete-conflict-fix'
A corner case bug in the ort merge strategy has been corrected. * en/merge-ort-renorm-with-rename-delete-conflict-fix: merge-ort: fix bug with renormalization and rename/delete conflicts
Diffstat (limited to 't/t6418-merge-text-auto.sh')
-rwxr-xr-xt/t6418-merge-text-auto.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t6418-merge-text-auto.sh b/t/t6418-merge-text-auto.sh
index 1e0296dd17..41288a60ce 100755
--- a/t/t6418-merge-text-auto.sh
+++ b/t/t6418-merge-text-auto.sh
@@ -204,4 +204,30 @@ test_expect_success 'Test delete/normalize conflict' '
test_path_is_missing file
'
+test_expect_success 'rename/delete vs. renormalization' '
+ git init subrepo &&
+ (
+ cd subrepo &&
+ echo foo >oldfile &&
+ git add oldfile &&
+ git commit -m original &&
+
+ git branch rename &&
+ git branch nuke &&
+
+ git checkout rename &&
+ git mv oldfile newfile &&
+ git commit -m renamed &&
+
+ git checkout nuke &&
+ git rm oldfile &&
+ git commit -m deleted &&
+
+ git checkout rename^0 &&
+ test_must_fail git -c merge.renormalize=true merge nuke >out &&
+
+ grep "rename/delete" out
+ )
+'
+
test_done