aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
diff options
context:
space:
mode:
authorIvan Motsch <ivan.motsch@bsiag.com>2016-02-25 15:39:41 +0100
committerChristian Halstrick <christian.halstrick@sap.com>2016-03-07 17:24:32 +0100
commitb811e4399ea578a07595bac790ad619b9fcb1300 (patch)
treef250d10e959185a6162f5748a5afcd7fe06ad239 /org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
parent846ef78a02edceb99940d7aa92dcd2462a85c602 (diff)
downloadjgit-b811e4399ea578a07595bac790ad619b9fcb1300.tar.gz
jgit-b811e4399ea578a07595bac790ad619b9fcb1300.zip
Add EOL stream type detection to TreeWalk
TreeWalk provides the new method getEolStreamType. This new method can be used with EolStreamTypeUtil in order to create a wrapped InputStream or OutputStream when reading / writing files. The implementation implements support for the git configuration options core.crlf, core.eol and the .gitattributes "text", "eol" and "binary" CQ: 10896 Bug: 486563 Change-Id: Ie4f6367afc2a6aec1de56faf95120fff0339a358 Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
index a83814eb46..d803efd649 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
@@ -66,7 +66,7 @@ import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.CoreConfig.AutoCRLF;
import org.eclipse.jgit.treewalk.WorkingTreeOptions;
import org.eclipse.jgit.util.IO;
-import org.eclipse.jgit.util.io.EolCanonicalizingInputStream;
+import org.eclipse.jgit.util.io.AutoLFInputStream;
/**
* Blame command for building a {@link BlameResult} for a file path.
@@ -248,7 +248,7 @@ public class BlameCommand extends GitCommand<BlameResult> {
rawText = new RawText(inTree);
break;
case TRUE:
- EolCanonicalizingInputStream in = new EolCanonicalizingInputStream(
+ AutoLFInputStream in = new AutoLFInputStream(
new FileInputStream(inTree), true);
// Canonicalization should lead to same or shorter length
// (CRLF to LF), so the file size on disk is an upper size bound