deprecate me.found
This commit is contained in:
parent
d2a0aa3098
commit
d962ff8db0
|
@ -47,6 +47,8 @@ func (args) doBashAuto() {
|
||||||
fmt.Println("--full")
|
fmt.Println("--full")
|
||||||
case "pull":
|
case "pull":
|
||||||
fmt.Println("list --force")
|
fmt.Println("list --force")
|
||||||
|
case "--find":
|
||||||
|
fmt.Println("foo bar")
|
||||||
case "patch":
|
case "patch":
|
||||||
fmt.Println("get list --submit show")
|
fmt.Println("get list --submit show")
|
||||||
case "user":
|
case "user":
|
||||||
|
|
16
find.go
16
find.go
|
@ -20,8 +20,7 @@ func doFind() *gitpb.Repos {
|
||||||
}
|
}
|
||||||
|
|
||||||
if argv.List.Mine {
|
if argv.List.Mine {
|
||||||
findMine()
|
return findMine()
|
||||||
return me.found
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if argv.List.Dirty {
|
if argv.List.Dirty {
|
||||||
|
@ -33,8 +32,7 @@ func doFind() *gitpb.Repos {
|
||||||
|
|
||||||
func (f *FindCmd) findRepos() *gitpb.Repos {
|
func (f *FindCmd) findRepos() *gitpb.Repos {
|
||||||
if f == nil {
|
if f == nil {
|
||||||
findMine()
|
return findMine()
|
||||||
return me.found
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.All {
|
if f.All {
|
||||||
|
@ -47,8 +45,7 @@ func (f *FindCmd) findRepos() *gitpb.Repos {
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.Mine {
|
if f.Mine {
|
||||||
findMine()
|
return findMine()
|
||||||
return me.found
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.Favorites {
|
if f.Favorites {
|
||||||
|
@ -77,14 +74,17 @@ func findPrivate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// finds repos that are writable
|
// finds repos that are writable
|
||||||
func findMine() {
|
func findMine() *gitpb.Repos {
|
||||||
|
found := gitpb.NewRepos()
|
||||||
|
|
||||||
// log.Printf("get mine %s\n", me.forge.GetGoSrc())
|
// log.Printf("get mine %s\n", me.forge.GetGoSrc())
|
||||||
for repo := range me.forge.Repos.IterByFullPath() {
|
for repo := range me.forge.Repos.IterByFullPath() {
|
||||||
|
|
||||||
if me.forge.Config.IsWritable(repo.GetGoPath()) {
|
if me.forge.Config.IsWritable(repo.GetGoPath()) {
|
||||||
me.found.AppendByGoPath(repo)
|
found.AppendByGoPath(repo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return found
|
||||||
}
|
}
|
||||||
|
|
||||||
// finds repos the user has marked as favorites in the forge .config
|
// finds repos the user has marked as favorites in the forge .config
|
||||||
|
|
Loading…
Reference in New Issue