DisplayName used previously contained ONLY the last part
of ref-spec: this would have not worked when looking for
objects with full ref-spec.
try {\r
// search for the branch in local heads\r
for (RefModel ref : JGitUtils.getLocalBranches(repository, false, -1)) {\r
- if (ref.displayName.endsWith(name)) {\r
+ if (ref.reference.getName().endsWith(name)) {\r
branch = ref;\r
break;\r
}\r
// search for the branch in remote heads\r
if (branch == null) {\r
for (RefModel ref : JGitUtils.getRemoteBranches(repository, false, -1)) {\r
- if (ref.displayName.endsWith(name)) {\r
+ if (ref.reference.getName().endsWith(name)) {\r
branch = ref;\r
break;\r
}\r