]> source.dussan.org Git - jgit.git/commit
Perform automatic CRLF to LF conversion during WorkingTreeIterator 79/1179/7
authorMarc Strapetz <marc.strapetz@syntevo.com>
Thu, 29 Jul 2010 14:21:37 +0000 (16:21 +0200)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 21 Aug 2010 01:03:07 +0000 (18:03 -0700)
commite2e38792b5403da38d5e3ab0e15b626e051107f2
tree147cc47a9772a8d7af72814b8f9dc239ee27605b
parent2b23aac1c01f1df0d22d1ef052b87d9c462e6b77
Perform automatic CRLF to LF conversion during WorkingTreeIterator

WorkingTreeIterator now optionally performs CRLF to LF conversion for
text files.  A basic framework is left in place to support enabling
(or disabling) this feature based on gitattributes, and also to
support the more generic smudge/clean filter system.  As there is
no gitattribute support yet in JGit this is left unimplemented,
but the mightNeedCleaning(), isBinary() and filterClean() methods
will provide reasonable places to plug that into in the future.

[sp: All bugs inside of WorkingTreeIterator are my fault, I wrote
     most of it while cherry-picking this patch and building it on
     top of Marc's original work.]

CQ: 4419
Bug: 301775
Change-Id: I0ca35cfbfe3f503729cbfc1d5034ad4abcd1097e
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
12 files changed:
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/AbstractTreeIteratorTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorWithTimeControl.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/EolCanonicalizingInputStreamTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeOptions.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/util/IO.java
org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolCanonicalizingInputStream.java [new file with mode: 0644]