-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for read-tree -u --reset with a D/F conflict
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |