This should improve performance of autocrlf checkout.
Bug: 580651
Change-Id: I2e2fe0273ac3c71fad50a575278234804ee28306
package org.eclipse.jgit.util.io;
+import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.OutputStream;
* @since 4.3
*/
public AutoCRLFOutputStream(OutputStream out, boolean detectBinary) {
- this.out = out;
+ // avoid to write single lines directly to FileOutputStream:
+ this.out = out instanceof BufferedOutputStream ? out
+ : new BufferedOutputStream(out);
this.detectBinary = detectBinary;
}