[git] refs parser can recognize lines like HEAD -> refs/heads/master in git log output
authorJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Wed, 16 Nov 2016 16:13:38 +0000 (19:13 +0300)
committerJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Wed, 16 Nov 2016 16:47:13 +0000 (19:47 +0300)
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 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);
     List<VcsRef> refs = new ArrayList<>();
     for (String longRefPatch : longRefPaths) {
       VcsRef ref = createRef(hash, longRefPatch, root);