Thread (185 messages) 185 messages, 9 authors, 2022-12-15
STALE1292d
Revisions (8)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]
  7. v7 current
  8. v8 [diff vs current]

[PATCH v7 03/15] t6060: add tests for removed files

From: Alban Gruin <hidden>
Date: 2021-03-17 20:57:40
Subsystem: the rest · Maintainer: Linus Torvalds

Until now, t6060 did not not check git-mere-one-file's behaviour when a
file is deleted in a branch.  To avoid regressions on this during the
conversion, this adds a new file, `file3', in the commit tagged as`base', and
deletes it in the commit tagged as `two'.

Signed-off-by: Alban Gruin <redacted>
---
 t/t6060-merge-index.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/t/t6060-merge-index.sh b/t/t6060-merge-index.sh
index 9e15ceb957..0cbd8a1f7f 100755
--- a/t/t6060-merge-index.sh
+++ b/t/t6060-merge-index.sh
@@ -8,12 +8,14 @@ test_expect_success 'setup diverging branches' '
 		echo $i
 	done >file &&
 	cp file file2 &&
-	git add file file2 &&
+	cp file file3 &&
+	git add file file2 file3 &&
 	git commit -m base &&
 	git tag base &&
 	sed s/2/two/ <file >tmp &&
 	mv tmp file &&
 	cp file file2 &&
+	git rm file3 &&
 	git commit -a -m two &&
 	git tag two &&
 	git checkout -b other HEAD^ &&
@@ -41,6 +43,7 @@ test_expect_success 'read-tree does not resolve content merge' '
 	cat >expect <<-\EOF &&
 	file
 	file2
+	file3
 	EOF
 	git read-tree -i -m base ten two &&
 	git diff-files --name-only --diff-filter=U >unmerged &&
-- 
2.31.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help