| | |
| | | import org.eclipse.jgit.lib.Repository;
|
| | | import org.junit.Test;
|
| | |
|
| | | import com.gitblit.GitBlit;
|
| | | import com.gitblit.LuceneExecutor;
|
| | | import com.gitblit.models.RefModel;
|
| | | import com.gitblit.models.RepositoryModel;
|
| | | import com.gitblit.models.SearchResult;
|
| | | import com.gitblit.utils.FileUtils;
|
| | | import com.gitblit.utils.JGitUtils;
|
| | | import com.gitblit.utils.StringUtils;
|
| | |
|
| | |
| | |
|
| | | private RepositoryModel newRepositoryModel(Repository repository) {
|
| | | RepositoryModel model = new RepositoryModel();
|
| | | model.name = StringUtils.getRelativePath(GitBlitSuite.REPOSITORIES.getAbsolutePath(),
|
| | | repository.getDirectory().getAbsolutePath());
|
| | | model.name = FileUtils.getRelativePath(GitBlitSuite.REPOSITORIES, repository.getDirectory());
|
| | | model.hasCommits = JGitUtils.hasCommits(repository);
|
| | |
|
| | | // index all local branches
|