| | |
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import com.gitblit.Constants.AccessRestrictionType;
|
| | | import com.gitblit.Constants.FederationStrategy;
|
| | | import com.gitblit.utils.ArrayUtils;
|
| | | import com.gitblit.utils.StringUtils;
|
| | |
|
| | | /**
|
| | |
| | | public List<String> preReceiveScripts;
|
| | | public List<String> postReceiveScripts;
|
| | | public List<String> mailingLists;
|
| | | public Map<String, String> customFields;
|
| | | private String displayName;
|
| | |
|
| | | public RepositoryModel() {
|
| | |
| | | this.federationSets = new ArrayList<String>();
|
| | | this.federationStrategy = FederationStrategy.FEDERATE_THIS;
|
| | | }
|
| | | |
| | | public List<String> getLocalBranches() {
|
| | | if (ArrayUtils.isEmpty(availableRefs)) {
|
| | | return new ArrayList<String>();
|
| | | }
|
| | | List<String> localBranches = new ArrayList<String>();
|
| | | for (String ref : availableRefs) {
|
| | | if (ref.startsWith("refs/heads")) {
|
| | | localBranches.add(ref);
|
| | | }
|
| | | }
|
| | | return localBranches;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public String toString() {
|