all repos

mugit @ 155aa35

🐮 git server that your cow will love

mugit/AGENTS.md(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# mugit

This is a Go-based Git repository web interface. Use these guidelines when working on this codebase.


## Project Structure

```
internal/
├── cli/             # CLI command handling
├── config/          # Configuration management (YAML)
├── git/             # Git operations
│   └── gitservice/  # git upload-pack and git receive-pack implementation
├── handlers/        # Web interface and Git HTTP protocol handlers
├── humanize/        # Time formatting utilities
├── mirror/          # Repository mirroring worker
├── ssh/             # SSH Git server
└── web/             # All things web
```

## Key Dependencies

- `github.com/urfave/cli/v3` - CLI framework
- `github.com/go-git/go-git/v5` - Pure Go Git library
- `github.com/gliderlabs/ssh` - SSH server
- `github.com/yuin/goldmark` - Markdown rendering
- `github.com/cyphar/filepath-securejoin` - Secure path joining
- `olexsmir.xyz/x/is` - Test assertions

## Security

- Always use `securejoin.SecureJoin()` when constructing filesystem paths from user input
- Check `repo.IsPrivate()` before serving public repository content