public final class EolStreamTypeUtil
extends java.lang.Object
CoreConfig.EolStreamType| Modifier and Type | Field and Description |
|---|---|
private static boolean |
FORCE_EOL_LF_ON_CHECKOUT |
| Modifier | Constructor and Description |
|---|---|
private |
EolStreamTypeUtil() |
| Modifier and Type | Method and Description |
|---|---|
private static CoreConfig.EolStreamType |
checkInStreamType(WorkingTreeOptions options,
Attributes attrs) |
private static CoreConfig.EolStreamType |
checkOutStreamType(WorkingTreeOptions options,
Attributes attrs) |
static CoreConfig.EolStreamType |
detectStreamType(TreeWalk.OperationType op,
WorkingTreeOptions options,
Attributes attrs)
Convenience method used to detect if CRLF conversion has been configured
using the
global repo options
global attributes
info attributes
working tree .gitattributes
|
static java.io.InputStream |
wrapInputStream(java.io.InputStream in,
CoreConfig.EolStreamType conversion)
Wrap the input stream depending on
CoreConfig.EolStreamType |
static java.io.OutputStream |
wrapOutputStream(java.io.OutputStream out,
CoreConfig.EolStreamType conversion)
Wrap the output stream depending on
CoreConfig.EolStreamType |
private static final boolean FORCE_EOL_LF_ON_CHECKOUT
public static CoreConfig.EolStreamType detectStreamType(TreeWalk.OperationType op, WorkingTreeOptions options, Attributes attrs)
op - is the
TreeWalk.OperationType of
the current traversaloptions - are the Config options with key
WorkingTreeOptions.KEYattrs - are the Attributes of the
file for which the
CoreConfig.EolStreamType is to be
detectedCoreConfig.EolStreamType to be
performed for the selected
TreeWalk.OperationTypepublic static java.io.InputStream wrapInputStream(java.io.InputStream in,
CoreConfig.EolStreamType conversion)
CoreConfig.EolStreamTypein - original streamconversion - to be performedCoreConfig.EolStreamTypepublic static java.io.OutputStream wrapOutputStream(java.io.OutputStream out,
CoreConfig.EolStreamType conversion)
CoreConfig.EolStreamTypeout - original streamconversion - to be performedCoreConfig.EolStreamTypeprivate static CoreConfig.EolStreamType checkInStreamType(WorkingTreeOptions options, Attributes attrs)
private static CoreConfig.EolStreamType checkOutStreamType(WorkingTreeOptions options, Attributes attrs)