public final class EolStreamTypeUtil extends Object
CoreConfig.EolStreamType
Modifier and Type | Method and Description |
---|---|
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 InputStream |
wrapInputStream(InputStream in,
CoreConfig.EolStreamType conversion)
Wrap the input stream depending on
CoreConfig.EolStreamType |
static OutputStream |
wrapOutputStream(OutputStream out,
CoreConfig.EolStreamType conversion)
Wrap the output stream depending on
CoreConfig.EolStreamType |
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.KEY
attrs
- are the Attributes
of the
file for which the
CoreConfig.EolStreamType
is to be
detectedCoreConfig.EolStreamType
to be
performed for the selected
TreeWalk.OperationType
public static InputStream wrapInputStream(InputStream in, CoreConfig.EolStreamType conversion)
CoreConfig.EolStreamType
in
- original streamconversion
- to be performedCoreConfig.EolStreamType
public static OutputStream wrapOutputStream(OutputStream out, CoreConfig.EolStreamType conversion)
CoreConfig.EolStreamType
out
- original streamconversion
- to be performedCoreConfig.EolStreamType
Copyright © 2019 Eclipse JGit Project. All rights reserved.