summaryrefslogtreecommitdiff
path: root/doAdd.go
diff options
context:
space:
mode:
Diffstat (limited to 'doAdd.go')
-rw-r--r--doAdd.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/doAdd.go b/doAdd.go
new file mode 100644
index 0000000..ce819f5
--- /dev/null
+++ b/doAdd.go
@@ -0,0 +1,30 @@
+// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
+// Use of this source code is governed by the GPL 3.0
+
+package main
+
+import (
+ "os"
+ "strings"
+
+ "go.wit.com/lib/protobuf/gitpb"
+ "go.wit.com/log"
+)
+
+func doAdd() error {
+ wd, _ := os.Getwd()
+ found := gitpb.NewRepos()
+ for repo := range me.forge.Repos.IterAll() {
+ if strings.HasPrefix(repo.FullPath, wd) {
+ found.Append(repo)
+ }
+ }
+
+ if found.Len() > 0 {
+ me.forge.PrintDefaultTB(found)
+ return nil
+ }
+
+ log.Info("todo: scan", wd, "here")
+ return nil
+}