| | |
| | |
|
| | | import com.gitblit.models.RepositoryModel;
|
| | | import com.gitblit.models.UserModel;
|
| | | import com.gitblit.utils.FileUtils;
|
| | | import com.gitblit.utils.HttpUtils;
|
| | | import com.gitblit.utils.StringUtils;
|
| | |
|
| | |
| | | */
|
| | | protected RepositoryModel getRepositoryModel(ReceivePack rp) {
|
| | | Repository repository = rp.getRepository();
|
| | | String rootPath = GitBlit.getRepositoriesFolder().getAbsolutePath();
|
| | | String repositoryName = StringUtils.getRelativePath(rootPath, repository.getDirectory()
|
| | | .getAbsolutePath());
|
| | | String repositoryName = FileUtils.getRelativePath(GitBlit.getRepositoriesFolder(), repository.getDirectory());
|
| | | RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);
|
| | | return model;
|
| | | }
|