diff options
author | James Moger <james.moger@gmail.com> | 2017-02-08 09:34:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 09:34:07 -0500 |
commit | 3d569f8ce066a6cadf021cbebcc8152b315db2d7 (patch) | |
tree | 9ff859c069c8a165656bdd3f8c5cf667bca9472c /src/main | |
parent | cf2032c6820ab5cb88d82a4c229128a3674d7903 (diff) | |
parent | 61df9b9f633cd5ce176077ad0e1ce8436f019f0c (diff) | |
download | gitblit-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.java | 4 |
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);
|