diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2012-03-15 07:21:14 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2012-03-15 07:22:24 -0700 |
commit | ff13648ea295bba02ca192c00a39335b05468abe (patch) | |
tree | 752f455106b746df570ad5c4f7bf529d2ad3b635 /org.eclipse.jgit.test | |
parent | 9be6526e9dbcfaca168dd66caac36a9316d44d88 (diff) | |
download | jgit-ff13648ea295bba02ca192c00a39335b05468abe.tar.gz jgit-ff13648ea295bba02ca192c00a39335b05468abe.zip |
Revert "Quickfix for AutoCRLF handling"
This reverts commit 88fe2836edab8d8ce82d28acd9d07b061988ff3a.
Auto CRLF isn't special enough to be screwing around with the buffers
used for raw byte processing of the ObjectInserter API. If it needs a
buffer to process a file that is bigger than the buffer allocated by
an ObjectInserter, it needs to do its own buffer management.
Change-Id: Ida4aaa80d0f9f78035f3d2a9ebdde904c980f89a
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java index 07173a9c33..d989b63b24 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java @@ -114,7 +114,7 @@ public class AddCommandTest extends RepositoryTestCase { } @Test - public void testAddExistingSingleSmallFileWithNewLine() throws IOException, + public void testAddExistingSingleFileWithNewLine() throws IOException, NoFilepatternException { File file = new File(db.getWorkTree(), "a.txt"); FileUtils.createNewFile(file); @@ -138,35 +138,6 @@ public class AddCommandTest extends RepositoryTestCase { } @Test - public void testAddExistingSingleMediumSizeFileWithNewLine() - throws IOException, NoFilepatternException { - File file = new File(db.getWorkTree(), "a.txt"); - FileUtils.createNewFile(file); - StringBuilder data = new StringBuilder(); - for (int i = 0; i < 1000; ++i) { - data.append("row1\r\nrow2"); - } - String crData = data.toString(); - PrintWriter writer = new PrintWriter(file); - writer.print(crData); - writer.close(); - String lfData = data.toString().replaceAll("\r", ""); - Git git = new Git(db); - db.getConfig().setString("core", null, "autocrlf", "false"); - git.add().addFilepattern("a.txt").call(); - assertEquals("[a.txt, mode:100644, content:" + data + "]", - indexState(CONTENT)); - db.getConfig().setString("core", null, "autocrlf", "true"); - git.add().addFilepattern("a.txt").call(); - assertEquals("[a.txt, mode:100644, content:" + lfData + "]", - indexState(CONTENT)); - db.getConfig().setString("core", null, "autocrlf", "input"); - git.add().addFilepattern("a.txt").call(); - assertEquals("[a.txt, mode:100644, content:" + lfData + "]", - indexState(CONTENT)); - } - - @Test public void testAddExistingSingleBinaryFile() throws IOException, NoFilepatternException { File file = new File(db.getWorkTree(), "a.txt"); |