Skip to content

Commit 74e7259

Browse files
authored
Merge pull request go-git#1 from Hunter-Thompson/master
fix(submodule): cloning submodule using ssh url
2 parents c785af3 + 89b1e26 commit 74e7259

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ require (
1818
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351
1919
github.com/mitchellh/go-homedir v1.1.0
2020
github.com/sergi/go-diff v1.1.0
21+
github.com/whilp/git-urls v1.0.0
2122
github.com/xanzy/ssh-agent v0.3.1
2223
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97
2324
golang.org/x/net v0.0.0-20210326060303-6b1517762897

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
2222
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
2323
github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34=
2424
github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
25-
github.com/go-git/go-git-fixtures/v4 v4.3.0 h1:OAiwhtOsTVVUvVSLzwSO9PCCo/KPxGfn5aC3BV6d6TY=
26-
github.com/go-git/go-git-fixtures/v4 v4.3.0/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo=
2725
github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ=
2826
github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo=
2927
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
@@ -60,6 +58,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
6058
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
6159
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
6260
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
61+
github.com/whilp/git-urls v1.0.0 h1:95f6UMWN5FKW71ECsXRUd3FVYiXdrE7aX4NZKcPmIjU=
62+
github.com/whilp/git-urls v1.0.0/go.mod h1:J16SAmobsqc3Qcy98brfl5f5+e0clUvg1krgwk/qCfE=
6363
github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo=
6464
github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w=
6565
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=

submodule.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import (
55
"context"
66
"errors"
77
"fmt"
8-
"net/url"
98
"path"
109

1110
"github.com/go-git/go-billy/v5"
1211
"github.com/go-git/go-git/v5/config"
1312
"github.com/go-git/go-git/v5/plumbing"
1413
"github.com/go-git/go-git/v5/plumbing/format/index"
14+
url "github.com/whilp/git-urls"
1515
)
1616

1717
var (
@@ -375,7 +375,7 @@ func (s *SubmoduleStatus) IsClean() bool {
375375
// the SHA-1 found in the index of the containing repository.
376376
func (s *SubmoduleStatus) String() string {
377377
var extra string
378-
var status = ' '
378+
status := ' '
379379

380380
if s.Current.IsZero() {
381381
status = '-'

0 commit comments

Comments
 (0)