aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/remote.go b/remote.go
index 170883a..e335945 100644
--- a/remote.go
+++ b/remote.go
@@ -83,7 +83,7 @@ func (r *Remote) String() string {
var fetch, push string
if len(r.c.URLs) > 0 {
fetch = r.c.URLs[0]
- push = r.c.URLs[0]
+ push = r.c.URLs[len(r.c.URLs) - 1]
}
return fmt.Sprintf("%s\t%s (fetch)\n%[1]s\t%[3]s (push)", r.c.Name, fetch, push)
@@ -111,7 +111,7 @@ func (r *Remote) PushContext(ctx context.Context, o *PushOptions) (err error) {
}
if o.RemoteURL == "" {
- o.RemoteURL = r.c.URLs[0]
+ o.RemoteURL = r.c.URLs[len(r.c.URLs) - 1]
}
s, err := newSendPackSession(o.RemoteURL, o.Auth, o.InsecureSkipTLS, o.CABundle, o.ProxyOptions)