aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs/resources/org/eclipse/jgit
Commit message (Collapse)AuthorAgeFilesLines
* LFS: Enable LFS support for the CLI, better error handlingMarkus Duft2018-03-031-0/+1
| | | | | | | | | | Enable LFS support for the CLI by registering the according filters. Errors during filter creation must be propagated up the call stack, as a failure to create a filter should be treated as fatal if the filter is required. Change-Id: I3833757839bdda97cd01b6c21c1613d199e2692d Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* LFS: pre-push upload supportMarkus Duft2018-02-271-1/+2
| | | | | | | | | | | | If JGit built in LFS support is enabled for the current repository (or user/system), any existing pre-push hook will cause an exception for the time beeing, as only a single pre-push hook is supported. Thus either native pre-push hooks OR JGit built-in LFS support may be enabled currently, but not both. Change-Id: Ie7d2b90e26e948d9cca3d05a7a19489488c75895 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* LFS: Add remote download to SmudgeFilterMarkus Duft2018-02-161-1/+7
| | | | | | | | | | | | | | | 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>
* LfsProtocolServlet: Improve error on getLargeFileRepository failureDavid Pursehouse2017-01-141-0/+1
| | | | | | | | Externalize the error message and make it more specific. Also emit an error log. Change-Id: Ie7b1c90c54673bfb8e133fb0aa19a117d4ca6587 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add support for refusing LFS request due to invalid authorizationDavid Pursehouse2017-01-131-0/+1
| | | | | | | | | | | | | | | | | | | Add a new exception type that server implementations can throw when a client attempts to make an unauthorized LFS operation, which will result in HTTP 401 Unauthorized being returned to the client. An example of this is a Gerrit server that rejects a request to perform an LFS operation on a ref that is not visible to the caller. As defined in the LFS spec [1] the request may include authentication, and per RFC 2616 [2], "401 response indicates that authorization has been refused for those credentials". [1] https://github.com/git-lfs/git-lfs/blob/master/docs/api/batch.md [2] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html Change-Id: I2aa22e2144df5fb7972df0e3285b77b08ecc63f2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Move AtomicObjectOutputStream to lfs/internalChristian Halstrick2016-09-201-0/+1
| | | | | | | | | The class AtomicObjectOutputStream should be available to all lfs related classes, not only to the server side. Move the class from org.eclipse.jgit.lfs.server.fs to org.eclipse.jgit.lfs.internal to achieve that. Change-Id: I028e1c9ec7c21f316340b21d558b9a6b77e2060d
* Add built-in LFS clean filterChristian Halstrick2016-09-201-1/+2
| | | | | | | | | | | | Adds a JGit built-in implementation of the "git lfs clean" filter. This filter should do the same as the one described in [1]. But since this filter is written in Java and can be called by JGit without forking new processes it should be much faster [1] https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-clean.1.ronn Change-Id: If60e387e97870245b4bd765eda6717eb84cffb1d
* Add specific exception for LFS unavailableDavid Pursehouse2016-08-301-1/+2
| | | | | | | | | | | | Instead of returning null, LfsProtocolServlet#getLargeFileRepository should throw LfsUnavailable. If null is returned, throw a generic LfsException. Handle LfsException as an internal server error and return HTTP 500. Change-Id: I33e2a19fcc0fde8aaf0f703860c8fa8ce2de2db5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* LfsRepository{NotFound,ReadOnly}: Externalize message stringsDavid Pursehouse2016-08-201-1/+3
| | | | | | | | Instead of hard-coding the message strings, define them in a properties file. This will allow them to be translated. Change-Id: I77556881579e66b2c13d187759c7efdddfee87ae Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Implement SHA-256 abstractionMatthias Sohn2016-02-041-0/+4
The Large File Storage extension specified by GitHub [1] uses SHA-256 to compute the ID of large files stored by the extension. Hence implement a SHA-256 abstraction similar to the SHA-1 abstraction used by JGit. [1] https://git-lfs.github.com/ Bug: 470333 Change-Id: I3a95954543c8570d73929e55f4a884b55dbf1b7a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>