Skip to content

Commit

Permalink
Add a test for read-tree -u --reset with a D/F conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Mar 9, 2008
1 parent 1cbcefb commit 50753d0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions t/t1005-read-tree-reset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

test_description='read-tree -u --reset'

. ./test-lib.sh

# two-tree test

test_expect_success 'setup' '
git init &&
mkdir df &&
echo content >df/file &&
git add df/file &&
git commit -m one &&
git ls-files >expect &&
rm -rf df &&
echo content >df &&
git add df &&
echo content >new &&
git add new &&
git commit -m two
'

test_expect_failure 'reset should work' '
git read-tree -u --reset HEAD^ &&
git ls-files >actual &&
diff -u expect actual
'

test_done

0 comments on commit 50753d0

Please sign in to comment.