diff options
author | Luca Milanesio <luca@milanesio.org> | 2012-12-02 08:50:55 +0000 |
---|---|---|
committer | Luca Milanesio <luca@milanesio.org> | 2012-12-02 08:53:09 +0000 |
commit | 8744a1e9de208117bc6187d9e917b9ed8da83f94 (patch) | |
tree | 52fcec8680f029fa84644460e010e68d481e682a | |
parent | 6534b72c23c2306bfe57a7b5ec7b02cce181cf89 (diff) | |
download | gitblit-8744a1e9de208117bc6187d9e917b9ed8da83f94.tar.gz gitblit-8744a1e9de208117bc6187d9e917b9ed8da83f94.zip |
FIX: Allow correct search for RefModel using branch name.
DisplayName used previously contained ONLY the last part
of ref-spec: this would have not worked when looking for
objects with full ref-spec.
-rw-r--r-- | src/com/gitblit/utils/JGitUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java index 9cfb37fd..beaa27da 100644 --- a/src/com/gitblit/utils/JGitUtils.java +++ b/src/com/gitblit/utils/JGitUtils.java @@ -1528,7 +1528,7 @@ public class JGitUtils { try {
// search for the branch in local heads
for (RefModel ref : JGitUtils.getLocalBranches(repository, false, -1)) {
- if (ref.displayName.endsWith(name)) {
+ if (ref.reference.getName().endsWith(name)) {
branch = ref;
break;
}
@@ -1537,7 +1537,7 @@ public class JGitUtils { // search for the branch in remote heads
if (branch == null) {
for (RefModel ref : JGitUtils.getRemoteBranches(repository, false, -1)) {
- if (ref.displayName.endsWith(name)) {
+ if (ref.reference.getName().endsWith(name)) {
branch = ref;
break;
}
|