@@ -200,8 +200,17 @@ func runServ(ctx context.Context, c *cli.Command) error {
200200
201201 repoPath := strings .TrimPrefix (sshCmdArgs [1 ], "/" )
202202 repoPathFields := strings .SplitN (repoPath , "/" , 2 )
203+ rawGroup , _ , _ := strings .Cut (repoPathFields [1 ], "/" )
204+ var groupID int64
203205 if len (repoPathFields ) != 2 {
204- return fail (ctx , "Invalid repository path" , "Invalid repository path: %v" , repoPath )
206+ if len (repoPathFields ) == 3 {
207+ groupID , err = strconv .ParseInt (rawGroup , 10 , 64 )
208+ if err != nil {
209+ return fail (ctx , "Invalid repository path" , "Invalid repository path: %v" , repoPath )
210+ }
211+ } else {
212+ return fail (ctx , "Invalid repository path" , "Invalid repository path: %v" , repoPath )
213+ }
205214 }
206215
207216 username := repoPathFields [0 ]
@@ -248,16 +257,16 @@ func runServ(ctx context.Context, c *cli.Command) error {
248257
249258 requestedMode := getAccessMode (verb , lfsVerb )
250259
251- results , extra := private .ServCommand (ctx , keyID , username , reponame , requestedMode , verb , lfsVerb )
260+ results , extra := private .ServCommand (ctx , keyID , username , reponame , groupID , requestedMode , verb , lfsVerb )
252261 if extra .HasError () {
253262 return fail (ctx , extra .UserMsg , "ServCommand failed: %s" , extra .Error )
254263 }
255264
256265 // because the original repoPath maybe redirected, we need to use the returned actual repository information
257266 if results .IsWiki {
258- repoPath = repo_model .RelativeWikiPath (results .OwnerName , results .RepoName )
267+ repoPath = repo_model .RelativeWikiPath (results .OwnerName , results .RepoName , groupID )
259268 } else {
260- repoPath = repo_model .RelativePath (results .OwnerName , results .RepoName )
269+ repoPath = repo_model .RelativePath (results .OwnerName , results .RepoName , groupID )
261270 }
262271
263272 // LFS SSH protocol
0 commit comments