Handle '@' symbol in ssh username
authorsuman-ganta <suman.ganta@gmail.com>
Fri, 6 Jun 2014 05:37:18 +0000 (22:37 -0700)
committersuman-ganta <suman.ganta@gmail.com>
Fri, 6 Jun 2014 05:37:18 +0000 (22:37 -0700)
http://youtrack.jetbrains.com/issue/IDEA-123890
Git pull doesn't work if git username has 'at' symbol

plugins/git4idea/rt/src/org/jetbrains/git4idea/ssh/SSHMain.java

index 29a6b58ead194d8f9beff0749f088e97e6bbd65a..9ba9dd8532ca7179e37f7c9f99b5205a6cdc7f0a 100644 (file)
@@ -471,7 +471,7 @@ public class SSHMain implements GitExternalApp {
     }
     String host = args[i++];
     String user;
-    int atIndex = host.indexOf('@');
+    int atIndex = host.lastIndexOf('@');
     if (atIndex == -1) {
       user = null;
     }