| Modifier and Type | Class and Description |
|---|---|
| public static class | LfsFactory.
Encapsulate a potentially exchanged |
| public static interface | LfsFactory.
A command to enable LFS. |
| Modifier and Type | Field and Description |
|---|---|
| private static LfsFactory |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public LfsFactory. | Returns: a stream to the content that should be written to the object store along with the expected length of the stream. the original stream is not applicable.the repository db, InputStream the original input input, long the expected input stream length length, Attribute the attribute used to check for LFS enablement (i.e. "merge",
"diff", "filter" from .gitattributes). attribute)Apply clean filtering to the given stream, writing the file content to the LFS storage if required and returning a stream to the LFS pointer instead. |
| public ObjectLoader | Returns: a loader for the actual data of a blob, or the original loader in case LFS is not applicable.the repository db, ObjectLoader the loader for the blob loader, Attribute the attribute used to check for LFS enablement (i.e. "merge",
"diff", "filter" from .gitattributes). attribute)Apply smudge filtering to a given loader, potentially redirecting it to a LFS blob which is downloaded on demand. |
| public static Attributes | Returns: theAttributes for the given path.the repository db, String the path to find attributes for path)Get git attributes for given path |
| public static Attributes | Returns: theAttributes for the given path.the repository db, String the path to find attributes for path, RevCommit the commit to inspect. commit)Get attributes for given path and commit |
| public LfsFactory. | Returns: a command to install LFS support.Retrieve an |
| public static LfsFactory | |
| public PrePushHook | getPrePushHook(Repository
the repo, PrintStream Repository the hook is applied to.output stream outputStream)Retrieve a pre-push hook to be applied using the default error stream. |
| public PrePushHook | getPrePushHook(Repository
the repo, PrintStream Repository the hook is applied to.output stream outputStream, PrintStream error stream errorStream)Retrieve a pre-push hook to be applied. |
| public boolean | |
| public boolean | Returns: whether LFS is enabled for the given repository locally or globally.the repository to check db)Whether LFS is enabled |
| public static void | setInstance(LfsFactory
register a instance)LfsFactory instance as the
LfsFactory implementation to use.Set the LFS factory instance |
| instance | back to summary |
|---|---|
| private static LfsFactory instance | |
| LfsFactory | back to summary |
|---|---|
| protected LfsFactory() Constructor | |
| applyCleanFilter | back to summary |
|---|---|
| public LfsFactory. Apply clean filtering to the given stream, writing the file content to the LFS storage if required and returning a stream to the LFS pointer instead.
| |
| applySmudgeFilter | back to summary |
|---|---|
| public ObjectLoader applySmudgeFilter(Repository db, ObjectLoader loader, Attribute attribute) throws IOException Apply smudge filtering to a given loader, potentially redirecting it to a LFS blob which is downloaded on demand.
| |
| getAttributesForPath | back to summary |
|---|---|
| public static Attributes getAttributesForPath(Repository db, String path) throws IOException Get git attributes for given path
| |
| getAttributesForPath | back to summary |
|---|---|
| public static Attributes getAttributesForPath(Repository db, String path, RevCommit commit) throws IOException Get attributes for given path and commit
| |
| getInstallCommand | back to summary |
|---|---|
| public LfsFactory. Retrieve an
| |
| getInstance | back to summary |
|---|---|
| public static LfsFactory getInstance() Get the LFS factory instance
| |
| getPrePushHook | back to summary |
|---|---|
| public PrePushHook getPrePushHook(Repository repo, PrintStream outputStream) Retrieve a pre-push hook to be applied using the default error stream.
| |
| getPrePushHook | back to summary |
|---|---|
| public PrePushHook getPrePushHook(Repository repo, PrintStream outputStream, PrintStream errorStream) Retrieve a pre-push hook to be applied.
| |
| isAvailable | back to summary |
|---|---|
| public boolean isAvailable() Whether LFS support is available
| |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(Repository db) Whether LFS is enabled
| |
| setInstance | back to summary |
|---|---|
| public static void setInstance(LfsFactory instance) Set the LFS factory instance
| |
InputStream along with the
expected stream content length.
| Modifier and Type | Field and Description |
|---|---|
| private long | length
The expected stream content length. |
| private InputStream | stream
The actual stream. |
| Access | Constructor and Description |
|---|---|
| public | LfsInputStream(InputStream
the stream to wrap. the stream will be closed on
stream, long close().the expected length of the stream length)Create a new wrapper around a certain stream |
| public | LfsInputStream(TemporaryBuffer
the buffer to initialize stream and length from. The
buffer will be destroyed on buffer)close()Create a new wrapper around a temporary buffer. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| public long | |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. Reads up to |
| length | back to summary |
|---|---|
| private long length The expected stream content length. | |
| stream | back to summary |
|---|---|
| private InputStream stream The actual stream. | |
| LfsInputStream | back to summary |
|---|---|
| public LfsInputStream(InputStream stream, long length) Create a new wrapper around a certain stream
| |
| LfsInputStream | back to summary |
|---|---|
| public LfsInputStream(TemporaryBuffer buffer) throws IOException Create a new wrapper around a temporary buffer.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| getLength | back to summary |
|---|---|
| public long getLength() Get stream length
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |
Repository to enable
locally on the repository only.
| Modifier and Type | Method and Description |
|---|---|
| public LfsFactory. | Returns: TheLfsInstallCommand for chaining.the repository to enable support for. repo)Set the repository to enable LFS for |
| setRepository | back to summary |
|---|---|
| public LfsFactory. Set the repository to enable LFS for
| |