Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t7405: verify 'merge --abort' works after submodule/path conflicts
author
Elijah Newren
<newren@gmail.com>
Wed, 11 Jul 2018 03:56:59 +0000
(20:56 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 11 Jul 2018 16:40:04 +0000
(09:40 -0700)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7405-submodule-merge.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
e81c7d4
)
diff --git
a/t/t7405-submodule-merge.sh
b/t/t7405-submodule-merge.sh
index 45d1779d2906c5eda1b665b14e8df1f495ef45fa..7855bd8648f84b074e8a028a50aef49495c75431 100755
(executable)
--- a/
t/t7405-submodule-merge.sh
+++ b/
t/t7405-submodule-merge.sh
@@
-333,6
+333,19
@@
test_expect_failure 'file/submodule conflict' '
)
'
)
'
+test_expect_success 'file/submodule conflict; merge --abort works afterward' '
+ test_when_finished "git -C file-submodule reset --hard" &&
+ (
+ cd file-submodule &&
+
+ git checkout A^0 &&
+ test_must_fail git merge B^0 >out 2>err &&
+
+ test_path_is_file .git/MERGE_HEAD &&
+ git merge --abort
+ )
+'
+
# Directory/submodule conflict
# Commit O: <empty>
# Commit A: path (submodule), with sole tracked file named 'world'
# Directory/submodule conflict
# Commit O: <empty>
# Commit A: path (submodule), with sole tracked file named 'world'
@@
-417,7
+430,25
@@
test_expect_failure 'directory/submodule conflict; should not treat submodule fi
# merge from starting; we should not be writing to such paths
# anyway.
test_i18ngrep ! "refusing to lose untracked file at" err
# merge from starting; we should not be writing to such paths
# anyway.
test_i18ngrep ! "refusing to lose untracked file at" err
+ )
+'
+
+test_expect_failure 'directory/submodule conflict; merge --abort works afterward' '
+ test_when_finished "git -C directory-submodule/path reset --hard" &&
+ test_when_finished "git -C directory-submodule reset --hard" &&
+ (
+ cd directory-submodule &&
+ git checkout A^0 &&
+ test_must_fail git merge B2^0 &&
+ test_path_is_file .git/MERGE_HEAD &&
+
+ # merge --abort should succeed, should clear .git/MERGE_HEAD,
+ # and should not leave behind any conflicted files
+ git merge --abort &&
+ test_path_is_missing .git/MERGE_HEAD &&
+ git ls-files -u >conflicts &&
+ test_must_be_empty conflicts
)
'
)
'