[git] refs parser can recognize lines like HEAD -> refs/heads/master in git log output
[idea/community.git] / plugins / git4idea / tests / git4idea / test / RefParser.java
index 1f6ccf9c1fb1c121bd4ab08cf9564e6aa29f041b..61062b95ddc6abb144f3d8bda92dde0b0104478c 100644 (file)
@@ -48,7 +48,7 @@ class RefParser {
     String strHash = input.substring(0, firstSpaceIndex);
     Hash hash = HashImpl.build(strHash);
     String refPaths = input.substring(firstSpaceIndex + 2, input.length() - 1);
-    String[] longRefPaths = refPaths.split("");
+    String[] longRefPaths = refPaths.split("(, )|( -> )");
     List<VcsRef> refs = new ArrayList<>();
     for (String longRefPatch : longRefPaths) {
       VcsRef ref = createRef(hash, longRefPatch, root);