Add a test for read-tree -u --reset with a D/F conflict
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Mar 8, 2008 at 20:27 UTC
50753d00d691c1ea16bc72446705aee2c128fc2f
1 file changed
+30
t/t1005-read-tree-reset.sh
new
+30
@@ -0,0 +1,30 @@
1
+#!/bin/sh
2
+
3
+test_description='read-tree -u --reset'
4
+
5
+. ./test-lib.sh
6
+
7
+# two-tree test
8
+
9
+test_expect_success 'setup' '
10
+ git init &&
11
+ mkdir df &&
12
+ echo content >df/file &&
13
+ git add df/file &&
14
+ git commit -m one &&
15
+ git ls-files >expect &&
16
+ rm -rf df &&
17
+ echo content >df &&
18
+ git add df &&
19
+ echo content >new &&
20
+ git add new &&
21
+ git commit -m two
22
+'
23
+
24
+test_expect_failure 'reset should work' '
25
+ git read-tree -u --reset HEAD^ &&
26
+ git ls-files >actual &&
27
+ diff -u expect actual
28
+'
29
+
30
+test_done