File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ func (a *Args) GetParam(i int) string {
104
104
105
105
func (a * Args ) FirstParam () string {
106
106
if a .ParamsSize () == 0 {
107
- panic (fmt . Sprintf ( "Index 0 is out of bound" ) )
107
+ panic ("Index 0 is out of bound" )
108
108
}
109
109
110
110
return a .Params [0 ]
Original file line number Diff line number Diff line change @@ -76,13 +76,13 @@ func transformCloneArgs(args *Args) {
76
76
p .Parse (args .Params )
77
77
78
78
nameWithOwnerRegexp := regexp .MustCompile (NameWithOwnerRe )
79
- for _ , i := range p .PositionalIndices {
79
+ if len (p .PositionalIndices ) > 0 {
80
+ i := p .PositionalIndices [0 ]
80
81
a := args .Params [i ]
81
82
if nameWithOwnerRegexp .MatchString (a ) && ! isCloneable (a ) {
82
83
url := getCloneURL (a , isSSH , args .Command != "submodule" )
83
84
args .ReplaceParam (i , url )
84
85
}
85
- break
86
86
}
87
87
}
88
88
Original file line number Diff line number Diff line change @@ -196,8 +196,7 @@ const (
196
196
type truncingMethod int
197
197
198
198
const (
199
- noTrunc truncingMethod = iota
200
- truncLeft
199
+ truncLeft truncingMethod = iota
201
200
truncRight
202
201
truncMiddle
203
202
)
You can’t perform that action at this time.
0 commit comments