Thread (33 messages) flat view 33 messages, 5 authors, 2016-06-15
DORMANTno replies

[PATCH 02/12] t6038 (merge.renormalize): try checkout -m and cherry-pick

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:15
Subsystem: the rest · Maintainer: Linus Torvalds

checkout -m and cherry-pick have not been wired up to respect
merge.renormalize, but a naïve user would not know that.

Signed-off-by: Jonathan Nieder <redacted>
---
This series does not change these to expect success, but they
are part of the same thought process.

 t/t6038-merge-text-auto.sh |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/t/t6038-merge-text-auto.sh b/t/t6038-merge-text-auto.sh
index e21b5d2..a7ea4b6 100755
--- a/t/t6038-merge-text-auto.sh
+++ b/t/t6038-merge-text-auto.sh
@@ -85,6 +85,47 @@ test_expect_success 'Merge addition of text=auto' '
 	test_cmp expected file
 '
 
+test_expect_failure 'checkout -m after setting text=auto' '
+	cat <<-\EOF >expected &&
+	first line
+	same line
+	EOF
+
+	git rm -fr . &&
+	rm -f .gitattributes &&
+	git reset --hard initial &&
+	git checkout a -- . &&
+	git checkout -m b &&
+	test_cmp expected file
+'
+
+test_expect_failure 'checkout -m addition of text=auto' '
+	cat <<-\EOF >expected &&
+	first line
+	same line
+	EOF
+
+	git rm -fr . &&
+	rm -f .gitattributes file &&
+	git reset --hard initial &&
+	git checkout b -- . &&
+	git checkout -m a &&
+	test_cmp expected file
+'
+
+test_expect_failure 'cherry-pick patch from after text=auto was added' '
+	append_cr <<-\EOF >expected &&
+	first line
+	same line
+	EOF
+
+	git rm -fr . &&
+	git reset --hard b &&
+	test_must_fail git cherry-pick a >err 2>&1 &&
+	grep "[Nn]othing added" err &&
+	test_cmp expected file
+'
+
 test_expect_success 'Test delete/normalize conflict' '
 	git checkout -f side &&
 	git rm -fr . &&
-- 
1.7.2.1.544.ga752d.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help