summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-08 16:18:59 -0500
committerJeff Carr <[email protected]>2025-09-08 16:18:59 -0500
commitbe62079b78357e58130c8632e53786d482a0ca45 (patch)
tree1e82a1e601518eeceacd803b4f23859a7bbb73e3
parent4c5ded025f33fd19ae14362e9203e130cd0a0ee3 (diff)
rm old codev0.0.28
-rw-r--r--handlePatches.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/handlePatches.go b/handlePatches.go
index 2c5ce83..05ecefa 100644
--- a/handlePatches.go
+++ b/handlePatches.go
@@ -1,12 +1,8 @@
package main
import (
- "net/http"
-
"go.wit.com/lib/protobuf/forgepb"
- "go.wit.com/lib/protobuf/gitpb"
"go.wit.com/lib/protobuf/httppb"
- "go.wit.com/log"
)
func addNewPatches(pb *forgepb.Patches, reqPB *httppb.HttpRequest) *forgepb.Patches {
@@ -46,22 +42,6 @@ func sendPendingPatchsets(pb *forgepb.Patchsets, reqPB *httppb.HttpRequest) *for
return allPatchsetsPB
}
-/*
-func handlePatches(w http.ResponseWriter, pb *forgepb.Patches) error {
- route := pb.HttpRequest.Route
-
- log.Info("GOT PATCHES ROUTE", route, "with # patches =", pb.Len())
- if strings.HasPrefix(route, "/patches/old") {
- } else if strings.HasPrefix(route, "/patches/new") {
- log.Info("add new patches")
- } else {
- log.Info("unknown route", route)
- }
-
- return nil
-}
-*/
-
func makeReposPB(reqPB *httppb.HttpRequest) (*gitpb.Repos, error) {
pb := gitpb.NewRepos()
err := pb.Unmarshal(reqPB.ServerData)
@@ -84,19 +64,3 @@ func sendPatchesError(w http.ResponseWriter, r *forgepb.Patches, err error) erro
log.Info("send error back to user", err)
return nil
}
-
-/*
-func marshalPatchesPB(r *http.Request, msg []byte) (*forgepb.Patches, error) {
- pb := forgepb.NewPatches()
-
- if err := pb.Unmarshal(msg); err != nil {
- log.Info("proto.Unmarshal() failed on wire message len", len(msg), err)
- // add the header
- pb.AddHttpToPB(r)
- return pb, err
- }
- // add the header
- pb.AddHttpToPB(r)
- return pb, nil
-}
-*/