Fix port number in ssh pull lines in emails

When sending emails about a new patch set from a host where the
sshd.listenAddress is *:$port we didn't include the : in the ssh://
URL, as we clipped it with substr(2).  Leave the : alone so the
port can be split from the hostname.

Change-Id: I5e85358498d9b27f57197125dd3c1b4199be4029
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-12-03 18:07:09 -08:00
parent aa5b83b04f
commit e529c0fab7
2 changed files with 2 additions and 2 deletions

View File

@@ -124,7 +124,7 @@ public abstract class NewChangeSender extends OutgoingEmail {
r.append("git pull ssh://");
if (host.startsWith("*:")) {
r.append(getGerritHost());
r.append(host.substring(2));
r.append(host.substring(1));
} else {
r.append(host);
}

View File

@@ -136,7 +136,7 @@ public class ReplacePatchSetSender extends ReplyToChangeSender {
r.append("git pull ssh://");
if (host.startsWith("*:")) {
r.append(getGerritHost());
r.append(host.substring(2));
r.append(host.substring(1));
} else {
r.append(host);
}