mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 13:05:50 +01:00
(refs #108)Add ZIP download button to the repository viewer tab.
This commit is contained in:
@@ -11,6 +11,7 @@ import org.eclipse.jgit.api.Git
|
||||
import org.eclipse.jgit.lib._
|
||||
import org.apache.commons.io.FileUtils
|
||||
import org.eclipse.jgit.treewalk._
|
||||
import org.eclipse.jgit.api.errors.RefNotFoundException
|
||||
|
||||
class RepositoryViewerController extends RepositoryViewerControllerBase
|
||||
with RepositoryService with AccountService with ReferrerAuthenticator
|
||||
@@ -186,8 +187,9 @@ trait RepositoryViewerControllerBase extends ControllerBase {
|
||||
using(Git.cloneRepository
|
||||
.setURI(getRepositoryDir(repository.owner, repository.name).toURI.toString)
|
||||
.setDirectory(cloneDir)
|
||||
.setBranch(revision)
|
||||
.call){ git =>
|
||||
|
||||
|
||||
// checkout the specified revision
|
||||
git.checkout.setName(revision).call
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user