diff options
author | Markus Duft <markus.duft@ssi-schaefer.com> | 2016-10-07 12:39:45 +0200 |
---|---|---|
committer | Christian Halstrick <christian.halstrick@sap.com> | 2018-02-16 18:27:25 +0100 |
commit | 94bcde663c75735049aae0acbd9f6d8519ed1f05 (patch) | |
tree | 0472611b708aa3758882e6e3b7cf4eb0aab83f52 /org.eclipse.jgit.lfs.server/src | |
parent | 9bebb1eae78401e1d3289dc3d84006c10d10c0ef (diff) | |
download | jgit-94bcde663c75735049aae0acbd9f6d8519ed1f05.tar.gz jgit-94bcde663c75735049aae0acbd9f6d8519ed1f05.zip |
LFS: Add remote download to SmudgeFilter
Transfer data in chunks of 8k Transferring data byte per byte is slow,
running checkout with CleanFilter on a 2.9MB file takes 20 seconds.
Using a buffer of 8k shrinks this time to 70ms.
Also register the filter commands in a way that the native GIT LFS can
be used alongside with JGit.
Implements auto-discovery of LFS server URL when cloning from a Gerrit
LFS server.
Change-Id: I452a5aa177dcb346d92af08b27c2e35200f246fd
Also-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.server/src')
-rw-r--r-- | org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java index 5b12be6651..688aef2af7 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java @@ -67,7 +67,7 @@ import org.eclipse.jgit.lfs.server.Response.Action; */ public class FileLfsRepository implements LargeFileRepository { - private final String url; + private String url; private final Path dir; /** @@ -179,4 +179,21 @@ public class FileLfsRepository implements LargeFileRepository { while (o >= p) dst[o--] = '0'; } + + /** + * @return the url of the content server + * @since 4.11 + */ + public String getUrl() { + return url; + } + + /** + * @param url + * the url of the content server + * @since 4.11 + */ + public void setUrl(String url) { + this.url = url; + } } |