🍰 Personal Multi-Git Remote Manager
go git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(config): Add '.' shorthand for current directory repository

Fuwn 0dbdee0e 999e4443

+26
+26
internal/config/config.go
··· 205 205 } 206 206 207 207 func (c Config) FindRepo(name string) (string, Repo, bool) { 208 + if name == "." { 209 + return c.FindRepoByPath(".") 210 + } 211 + 208 212 if repo, ok := c.Repos[name]; ok { 209 213 return name, repo, true 210 214 } ··· 276 280 277 281 return d.Remotes 278 282 } 283 + 284 + func (c Config) FindRepoByPath(path string) (string, Repo, bool) { 285 + absPath, err := filepath.Abs(path) 286 + if err != nil { 287 + return "", Repo{}, false 288 + } 289 + 290 + for name, repo := range c.Repos { 291 + repoPath := repo.ExpandPath() 292 + 293 + absRepoPath, err := filepath.Abs(repoPath) 294 + if err != nil { 295 + continue 296 + } 297 + 298 + if absPath == absRepoPath { 299 + return name, repo, true 300 + } 301 + } 302 + 303 + return "", Repo{}, false 304 + }