diff options
| author | TEC <git@tecosaur.net> | 2024-01-10 00:11:18 +0800 |
|---|---|---|
| committer | TEC <git@tecosaur.net> | 2024-01-10 00:16:00 +0800 |
| commit | 3c242638c0c6b1c95efa2fff57c915a9c5372eb4 (patch) | |
| tree | d95f032287082d9b3cfc09fa15151815a16aa42c /module.go | |
| parent | dddf64f130c51c8da7f9967a63a5fc4e84993740 (diff) | |
| download | caddy-fs-git-3c242638c0c6b1c95efa2fff57c915a9c5372eb4.tar.zst | |
Allow including revision inline
Diffstat (limited to '')
| -rw-r--r-- | module.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -68,8 +68,11 @@ func (fs *FS) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { if !d.Next() { // consume start of block return d.ArgErr() } - if d.NextArg() { // Optional "fs git <repo>" form + if d.NextArg() { // Optional "fs git <repo> [<rev>]" form fs.Repository = d.Val() + if d.NextArg() { + fs.Revision = d.Val() + } } else { // Form: fs git { // repo[sitory] <path> |
