all repos

mugit @ ad82a5b

馃惍 git server that your cow will love
2 files changed, 2 insertions(+), 4 deletions(-)
use git.ResolvePath instead of manual securejoin
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-03-21 18:47:45 +0200
Authored at: 2026-03-21 18:47:26 +0200
Change ID: xqtxuyvxpynwxqlqmslpowyovvspxovv
Parent: 334ab23
M internal/cli/cli.go
路路路
        4
        4
         	"context"

      
        5
        5
         	"fmt"

      
        6
        6
         

      
        7
        
        -	securejoin "github.com/cyphar/filepath-securejoin"

      
        8
        7
         	"github.com/urfave/cli/v3"

      
        9
        8
         	"olexsmir.xyz/mugit/internal/config"

      
        10
        9
         	"olexsmir.xyz/mugit/internal/git"

      路路路
        107
        106
         }

      
        108
        107
         

      
        109
        108
         func (c *Cli) openRepo(name string) (*git.Repo, error) {

      
        110
        
        -	path, err := securejoin.SecureJoin(c.cfg.Repo.Dir, name)

      
        
        109
        +	path, err := git.ResolvePath(c.cfg.Repo.Dir, name)

      
        111
        110
         	if err != nil {

      
        112
        111
         		return nil, err

      
        113
        112
         	}

      
M internal/cli/repo.go
路路路
        7
        7
         	"os"

      
        8
        8
         	"strings"

      
        9
        9
         

      
        10
        
        -	securejoin "github.com/cyphar/filepath-securejoin"

      
        11
        10
         	"github.com/urfave/cli/v3"

      
        12
        11
         	"olexsmir.xyz/mugit/internal/git"

      
        13
        12
         	"olexsmir.xyz/mugit/internal/mirror"

      路路路
        19
        18
         		return err

      
        20
        19
         	}

      
        21
        20
         

      
        22
        
        -	path, err := securejoin.SecureJoin(c.cfg.Repo.Dir, name)

      
        
        21
        +	path, err := git.ResolvePath(c.cfg.Repo.Dir, name)

      
        23
        22
         	if err != nil {

      
        24
        23
         		return err

      
        25
        24
         	}