File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -216,16 +216,18 @@ func runServ(c *cli.Context) error {
216216 }
217217 }
218218
219- // LowerCase and trim the repoPath as that's how they are stored.
220- repoPath = strings .ToLower (strings .TrimSpace (repoPath ))
221-
222219 rr := strings .SplitN (repoPath , "/" , 2 )
223220 if len (rr ) != 2 {
224221 return fail (ctx , "Invalid repository path" , "Invalid repository path: %v" , repoPath )
225222 }
226223
227- username := strings .ToLower (rr [0 ])
228- reponame := strings .ToLower (strings .TrimSuffix (rr [1 ], ".git" ))
224+ username := rr [0 ]
225+ reponame := strings .TrimSuffix (rr [1 ], ".git" )
226+
227+ // LowerCase and trim the repoPath as that's how they are stored.
228+ // This should be done after splitting the repoPath into username and reponame
229+ // so that username and reponame are not affected.
230+ repoPath = strings .ToLower (strings .TrimSpace (repoPath ))
229231
230232 if alphaDashDotPattern .MatchString (reponame ) {
231233 return fail (ctx , "Invalid repo name" , "Invalid repo name: %s" , reponame )
You can’t perform that action at this time.
0 commit comments