diff options
author | Jeremy Stribling <strib@users.noreply.github.com> | 2019-02-13 07:28:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 07:28:28 -0800 |
commit | 2ab6d5cd72b59cfd36b08078ddeebd1efb0d2254 (patch) | |
tree | a398b9df6d0d1afd13b6923393766a96b2a7af2d /config | |
parent | dcc9f375f4daedfef61e7ff2fbbfd851d42a72d8 (diff) | |
parent | 3889c6446da5f9d658b9bfe317429196e25aa4b7 (diff) | |
download | go-git-2ab6d5cd72b59cfd36b08078ddeebd1efb0d2254.tar.gz |
Merge pull request #1066 from keybase/strib/909-git-push-speedup-when-local
remote: speed up pushes when the "remote" repo is local
Diffstat (limited to 'config')
-rw-r--r-- | config/config.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index a637f6d..2c3b8b9 100644 --- a/config/config.go +++ b/config/config.go @@ -8,6 +8,7 @@ import ( "sort" "strconv" + "gopkg.in/src-d/go-git.v4/internal/url" format "gopkg.in/src-d/go-git.v4/plumbing/format/config" ) @@ -399,3 +400,7 @@ func (c *RemoteConfig) marshal() *format.Subsection { return c.raw } + +func (c *RemoteConfig) IsFirstURLLocal() bool { + return url.IsLocalEndpoint(c.URLs[0]) +} |