all repos

mugit @ 57f9c82

馃惍 git server that your cow will love
5 files changed, 9 insertions(+), 0 deletions(-)
ssh: print modt on clone/push
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-05-09 19:19:00 +0300
Authored at: 2026-05-09 18:42:05 +0300
Change ID: kuslvlzxqkotsszkuszzuvlonknsqwkv
Parent: 1db697a
M README.md
路路路
        69
        69
           title: "My Git Server"    # site title shown on index page

      
        70
        70
           description: "A place for my projects"

      
        71
        71
           host: git.example.com     # used for clone URLs and go-import meta tag

      
        
        72
        +  modt: "Welcome to my git server!" # message shown on SSH clone/push (empty = disabled)

      
        72
        73
         

      
        73
        74
         repo:

      
        74
        75
           dir: /var/lib/mugit   # directory with repositories

      
M internal/config/config.go
路路路
        27
        27
         	Title       string `yaml:"title"`

      
        28
        28
         	Description string `yaml:"description"`

      
        29
        29
         	Host        string `yaml:"host"`

      
        
        30
        +	Modt        string `yaml:"modt"`

      
        30
        31
         }

      
        31
        32
         

      
        32
        33
         type RepoConfig struct {

      
M internal/ssh/ssh.go
路路路
        67
        67
         		}

      
        68
        68
         	}

      
        69
        69
         

      
        
        70
        +	if s.cfg.Meta.Modt != "" {

      
        
        71
        +		fmt.Fprintln(stderr, s.cfg.Meta.Modt)

      
        
        72
        +	}

      
        
        73
        +

      
        70
        74
         	switch gitCmd {

      
        71
        75
         	case "git-upload-pack":

      
        72
        76
         		err = repo.UploadPack(ctx, false, "", stdin, stdout)

      
M testscript/ssh-push.txtar
路路路
        4
        4
         git -C local commit -m initial

      
        5
        5
         

      
        6
        6
         mugit repo new ssh-push

      
        
        7
        +

      
        7
        8
         exec env GIT_SSH_COMMAND=$SSH_WRAPPER git -C local push git@localhost:ssh-push.git master

      
        
        9
        +stderr 'Welcome to test mugit!'

      
        8
        10
         

      
        9
        11
         exec git clone $MURL/ssh-push verify-clone

      
        10
        12
         exists verify-clone/file.txt

      
M testscript_test.go
路路路
        64
        64
         		Meta: config.MetaConfig{

      
        65
        65
         			Title: "test mugit",

      
        66
        66
         			Host:  "localhost",

      
        
        67
        +			Modt:  "Welcome to test mugit!",

      
        67
        68
         		},

      
        68
        69
         		Repo: config.RepoConfig{

      
        69
        70
         			Dir:     reposDir,