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:
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user