summaryrefslogtreecommitdiff
path: root/doPatchsets.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-07-09 03:18:29 -0500
committerJeff Carr <[email protected]>2025-07-09 23:24:06 -0500
commit8a788bef6d201b50dd066a62167a23378e4162a7 (patch)
treeab18e3b8af5eab617b48bdceae38759ca4320aee /doPatchsets.go
parent3588440aed55e81864c1afd2d96d6b037242befd (diff)
make git clone work in forged
Diffstat (limited to 'doPatchsets.go')
-rw-r--r--doPatchsets.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/doPatchsets.go b/doPatchsets.go
index 90d11c6..7a22c0a 100644
--- a/doPatchsets.go
+++ b/doPatchsets.go
@@ -206,39 +206,6 @@ func lookupRepos(msg []byte) (*gitpb.Repos, error) {
return newpb, nil
}
-/* save the git.pb files
-+ if repo.Namespace == "" {
-+ log.Infof("repo: ERROR. no namespace. %s\n", repo.FullPath)
-+ continue
-+ }
-+
-+ repopath := filepath.Join("/home/forge", repo.Namespace)
-+ if !shell.IsDir(repopath) {
-+ if err := os.MkdirAll(repopath, os.ModePerm); err != nil {
-+ log.Warn("mkdir fail", repo.Namespace, err)
-+ continue
-+ }
-+ }
-+
-+ filename := filepath.Join(repopath, "git.pb")
-+ if !shell.Exists(filename) {
-+ data, err := repo.Marshal()
-+ if err != nil {
-+ log.Info("patchsets.Marshal() to wire failed", err)
-+ continue
-+ }
-+ gitpbf, err := os.OpenFile(filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
-+ defer gitpbf.Close()
-+ if err != nil {
-+ log.Info("filename open error:", filename, err)
-+ continue
-+ }
-+ gitpbf.Write(data)
-+ }
-+
-+ log.Infof("repo path: %s\n", repopath)
-*/
-
func updateRepos(msg []byte) (*gitpb.Repos, error) {
log.Info("proto.Unmarshal() try message len", len(msg))
m := gitpb.NewRepos()