summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorMarkus Fömpe <markus.foempe@gmail.com>2017-01-26 13:50:54 +0100
committerMarkus Fömpe <markus.foempe@gmail.com>2017-01-26 15:01:05 +0100
commit61df9b9f633cd5ce176077ad0e1ce8436f019f0c (patch)
tree24b086d28af4b50978ec3a24f5be266ed75c6041 /src/main
parent651b9980f5b8664939b91674252d0dfdc754fed2 (diff)
downloadgitblit-61df9b9f633cd5ce176077ad0e1ce8436f019f0c.tar.gz
gitblit-61df9b9f633cd5ce176077ad0e1ce8436f019f0c.zip
List branches from only one repository if a repository name is given
e.g.: https://localhost:8443/rpc/?req=LIST_REPOSITORY_BRANCHES&name=repo.git Fix #1184
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/gitblit/servlet/RpcServlet.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/servlet/RpcServlet.java b/src/main/java/com/gitblit/servlet/RpcServlet.java
index 9809a252..0081367f 100644
--- a/src/main/java/com/gitblit/servlet/RpcServlet.java
+++ b/src/main/java/com/gitblit/servlet/RpcServlet.java
@@ -133,6 +133,10 @@ public class RpcServlet extends JsonServlet {
model.name));
continue;
}
+ if(!StringUtils.isEmpty(objectName) && !objectName.equals(model.name)) {
+ // skip repository if a name was submitted and it doesn't match
+ continue;
+ }
// get local branches
Repository repository = gitblit.getRepository(model.name);
List<RefModel> refs = JGitUtils.getLocalBranches(repository, false, -1);