| | |
| | |
|
| | | private static final String R_CHANGES = "refs/changes/";
|
| | |
|
| | | private static final String R_PULL= "refs/pull/";
|
| | |
|
| | | public RefsPanel(String id, final String repositoryName, RevCommit c,
|
| | | Map<ObjectId, List<RefModel>> refs) {
|
| | | this(id, repositoryName, refs.get(c.getId()));
|
| | |
| | | // Gerrit change ref
|
| | | name = name.substring(R_CHANGES.length());
|
| | | cssClass = "otherRef";
|
| | | } else if (name.startsWith(R_PULL)) {
|
| | | // Pull Request ref
|
| | | name = "pull #" + name.substring(R_PULL.length());
|
| | | if (name.endsWith("/head")) {
|
| | | // strip pull request head from name |
| | | name = name.substring(0, name.length() - "/head".length());
|
| | | }
|
| | | cssClass = "pullRef";
|
| | | } else if (name.startsWith(Constants.R_REMOTES)) {
|
| | | // remote branch
|
| | | linkClass = LogPage.class;
|