summaryrefslogtreecommitdiff
path: root/applyPatch.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-11 05:54:19 -0600
committerJeff Carr <[email protected]>2025-01-11 05:54:19 -0600
commitabdcd1fc623b58982723ee4db73f6179ff84a2a2 (patch)
treecaf4b74e3144d928d23896ee964fa93ef3aaee05 /applyPatch.go
parentae8fd94a2c33f1bcfa56e009c4b88d82f0712c9d (diff)
updated to new protobuf filev0.22.38
Diffstat (limited to 'applyPatch.go')
-rw-r--r--applyPatch.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/applyPatch.go b/applyPatch.go
index 52713a9..8576add 100644
--- a/applyPatch.go
+++ b/applyPatch.go
@@ -13,7 +13,7 @@ import (
)
// returns bad if patches can not be applied
-func dumpPatchset(pset *forgepb.Patchs) bool {
+func dumpPatchset(pset *forgepb.Patchset) bool {
log.Info("applyPatches() NAME", pset.Name)
log.Info("applyPatches() COMMENT", pset.Comment)
log.Info("applyPatches() GIT_AUTHOR_NAME", pset.GetGitAuthorName())
@@ -85,7 +85,7 @@ func countCurrentPatches(repo *gitpb.Repo) int {
return len(result.Stdout)
}
-func applyPatchset(pset *forgepb.Patchs) error {
+func applyPatchset(pset *forgepb.Patchset) error {
var everythingworked bool = true
tmpdir, err := os.MkdirTemp("", "forge")
if err != nil {
@@ -132,7 +132,7 @@ func applyPatchset(pset *forgepb.Patchs) error {
return nil
}
-func readPatchFile(pbfile string) (*forgepb.Patchs, error) {
+func readPatchFile(pbfile string) (*forgepb.Patchset, error) {
bytes, err := os.ReadFile(pbfile)
if err != nil {
log.Info("readfile error", pbfile, err)
@@ -141,9 +141,9 @@ func readPatchFile(pbfile string) (*forgepb.Patchs, error) {
return handleBytes(bytes)
}
-func handleBytes(bytes []byte) (*forgepb.Patchs, error) {
- var pset *forgepb.Patchs
- pset = new(forgepb.Patchs)
+func handleBytes(bytes []byte) (*forgepb.Patchset, error) {
+ var pset *forgepb.Patchset
+ pset = new(forgepb.Patchset)
err := pset.Unmarshal(bytes)
if err != nil {
log.Info("Unmarshal failed", err)