feat(cmd): implement fetch and status commands, update deps to go1.26.1

- Implement fetch command: fetches all registered repos without merging,
  supports parallel execution via -j/--jobs flag
- Implement status command: shows uncommitted changes across all repos
  with per-file-type counts, supports parallel execution
- Update Go to 1.26.1
- Update go-git v5.16.5 -> v5.17.0, go-crypto v1.3.0 -> v1.4.0,
  go-billy v5.7.0 -> v5.8.0, x/net v0.50.0 -> v0.51.0
- Fix unregister command description (said 'add' instead of 'remove')
- Fix goimports formatting in mgconf_test.go
This commit is contained in:
2026-03-07 07:03:49 +00:00
parent 9d4ac7bc47
commit 348b87702d
6 changed files with 238 additions and 29 deletions

View File

@@ -51,8 +51,8 @@ func TestExpandPaths(t *testing.T) {
expected: []string{"/absolute/path/to/repo"},
},
{
name: "empty repos",
input: []Repo{},
name: "empty repos",
input: []Repo{},
expected: []string{},
},
{
@@ -138,8 +138,8 @@ func TestCollapsePaths(t *testing.T) {
},
},
{
name: "empty repos",
input: []Repo{},
name: "empty repos",
input: []Repo{},
expected: []string{},
},
{
@@ -328,12 +328,12 @@ func TestParseMGConfig(t *testing.T) {
func TestAddRepo(t *testing.T) {
tests := []struct {
name string
initial []Repo
addPath string
addRemote string
wantErr bool
wantCount int
name string
initial []Repo
addPath string
addRemote string
wantErr bool
wantCount int
}{
{
name: "add to empty",