summaryrefslogtreecommitdiff
path: root/helperPatches.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-06 23:09:49 -0500
committerJeff Carr <[email protected]>2025-10-06 23:09:49 -0500
commit0a0a766f1123081d29eefae2bf9755f4e17bc5b3 (patch)
tree9fa2fff0d946385606f3534daef4aef97e65a30a /helperPatches.go
parentabf2951624b39f7633a938a0c8dc681fac1257aa (diff)
patch get is smarter
Diffstat (limited to 'helperPatches.go')
-rw-r--r--helperPatches.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/helperPatches.go b/helperPatches.go
index c09730a..846ad46 100644
--- a/helperPatches.go
+++ b/helperPatches.go
@@ -134,32 +134,6 @@ func findCommitBySubject(subject string) (string, error) {
return "", fmt.Errorf("no commit found for subject: %s", subject)
}
-func isPatchIdApplied(patch *forgepb.Patch) error {
- repo := me.forge.FindByGoPath(patch.Namespace)
- if repo == nil {
- return log.Errorf("could not find repo %s", patch.Namespace)
- }
-
- comment := cleanSubject(patch.Comment)
-
- os.Chdir(repo.GetFullPath())
- newhash, err := findCommitBySubject(comment)
- if err != nil {
- return log.Errorf("patch: not found hash: %s %s %s %s %v", patch.CommitHash, patch.Namespace, comment, newhash, err)
- }
-
- patchId, err := repo.FindPatchIdByHash(newhash)
- if err != nil {
- return err
- }
-
- patch.PatchId = patchId
- patch.NewHash = newhash
-
- log.Infof("%s %s patch: found hash: %s %s\n", patch.CommitHash, newhash, patch.Namespace, comment)
- return nil
-}
-
// returns true if PB changed
func setNewCommitHash(patch *forgepb.Patch) error {
repo := me.forge.FindByGoPath(patch.Namespace)