Skip to content

Commit 4d98627

Browse files
authored
Merge branch 'main' into lunny/fix_compare_bug
2 parents 8980297 + fb247f6 commit 4d98627

File tree

17 files changed

+581
-385
lines changed

17 files changed

+581
-385
lines changed

cmd/serv.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,6 @@ func runServ(ctx context.Context, c *cli.Command) error {
229229
username := repoPathFields[0]
230230
reponame := strings.TrimSuffix(repoPathFields[1], ".git") // “the-repo-name" or "the-repo-name.wiki"
231231

232-
// LowerCase and trim the repoPath as that's how they are stored.
233-
// This should be done after splitting the repoPath into username and reponame
234-
// so that username and reponame are not affected.
235-
repoPath = strings.ToLower(strings.TrimSpace(repoPath))
236-
237232
if !repo.IsValidSSHAccessRepoName(reponame) {
238233
return fail(ctx, "Invalid repo name", "Invalid repo name: %s", reponame)
239234
}
@@ -280,6 +275,11 @@ func runServ(ctx context.Context, c *cli.Command) error {
280275
return fail(ctx, extra.UserMsg, "ServCommand failed: %s", extra.Error)
281276
}
282277

278+
// LowerCase and trim the repoPath as that's how they are stored.
279+
// This should be done after splitting the repoPath into username and reponame
280+
// so that username and reponame are not affected.
281+
repoPath = strings.ToLower(results.OwnerName + "/" + results.RepoName + ".git")
282+
283283
// LFS SSH protocol
284284
if verb == git.CmdVerbLfsTransfer {
285285
token, err := getLFSAuthToken(ctx, lfsVerb, results)

models/fixtures/user_redirect.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
id: 1
33
lower_name: olduser1
44
redirect_user_id: 1
5+
-
6+
id: 2
7+
lower_name: olduser2
8+
redirect_user_id: 2

options/fileicon/material-icon-rules.json

Lines changed: 89 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)