From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit,  gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command

---
 src/com/gitblit/models/RepositoryModel.java |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/com/gitblit/models/RepositoryModel.java b/src/com/gitblit/models/RepositoryModel.java
index d3e9158..324f7d4 100644
--- a/src/com/gitblit/models/RepositoryModel.java
+++ b/src/com/gitblit/models/RepositoryModel.java
@@ -22,6 +22,7 @@
 
 import com.gitblit.Constants.AccessRestrictionType;
 import com.gitblit.Constants.FederationStrategy;
+import com.gitblit.utils.ArrayUtils;
 import com.gitblit.utils.StringUtils;
 
 /**
@@ -53,14 +54,15 @@
 	public boolean skipSizeCalculation;
 	public boolean skipSummaryMetrics;
 	public String frequency;
+	public boolean isBare;
 	public String origin;
+	public String HEAD;
+	public List<String> availableRefs;
+	public List<String> indexedBranches;
 	public String size;
 	public List<String> preReceiveScripts;
 	public List<String> postReceiveScripts;
 	public List<String> mailingLists;
-	public RefModel defaultHead;
-	public List<RefModel> availableHeads;
-
 	private String displayName;
 	
 	public RepositoryModel() {
@@ -74,7 +76,20 @@
 		this.lastChange = lastchange;
 		this.accessRestriction = AccessRestrictionType.NONE;
 		this.federationSets = new ArrayList<String>();
-		this.federationStrategy = FederationStrategy.FEDERATE_THIS;
+		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

--
Gitblit v1.9.1