summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorJames Moger <james.moger@gmail.com>2017-02-08 09:34:07 -0500
committerGitHub <noreply@github.com>2017-02-08 09:34:07 -0500
commit3d569f8ce066a6cadf021cbebcc8152b315db2d7 (patch)
tree9ff859c069c8a165656bdd3f8c5cf667bca9472c /src/main
parentcf2032c6820ab5cb88d82a4c229128a3674d7903 (diff)
parent61df9b9f633cd5ce176077ad0e1ce8436f019f0c (diff)
downloadgitblit-3d569f8ce066a6cadf021cbebcc8152b315db2d7.tar.gz
gitblit-3d569f8ce066a6cadf021cbebcc8152b315db2d7.zip
Merge pull request #1192 from mystygage/listBranchForRepository
List branches from only one repository if a repository name is given
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);