fix the case where we're unable to clone if we specify the port 22

This commit is contained in:
Mohamed Zenadi 2017-01-16 20:53:23 +01:00
parent b6f5421d67
commit d0ca596006

View file

@ -426,9 +426,8 @@ public class GitActivity extends AppCompatActivity {
if (!protocol.equals("ssh://")) {
hostname = protocol + hostname;
} else {
// if the port is explicitly given, jgit requires the ssh://
if (!port.isEmpty())
if (!port.isEmpty() && !port.equals("22"))
hostname = protocol + hostname;
// did he forget the username?