summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-07-08 15:48:59 -0500
committerJeff Carr <[email protected]>2025-07-08 15:48:59 -0500
commit1c439782941d21d8b26bf5590b4f3d4b69da70ad (patch)
treeeef7eccf791eb0b179b1a1efa2aa3c0a0178bc80
parentd0616fae03cdf2160d2dce57be1cf44772b52a34 (diff)
add debugging printf'sv0.0.104
-rw-r--r--http.go11
-rw-r--r--reloadTags.go8
2 files changed, 17 insertions, 2 deletions
diff --git a/http.go b/http.go
index c47269d..e333185 100644
--- a/http.go
+++ b/http.go
@@ -17,7 +17,11 @@ func httpPost(url string, data []byte) ([]byte, error) {
var req *http.Request
req, err = http.NewRequest(http.MethodPost, url, bytes.NewBuffer(data))
- // log.Info("httpPost() with len", len(data), "url", url)
+ log.Info("httpPost() with len", len(data), "url", url)
+ if err != nil {
+ log.Error(err)
+ return nil, err
+ }
usr, _ := user.Current()
req.Header.Set("author", usr.Username)
@@ -38,6 +42,7 @@ func httpPost(url string, data []byte) ([]byte, error) {
return body, err
}
+ log.Info("gitpb.httpPost() worked", url)
return body, nil
}
@@ -53,8 +58,10 @@ func (r *Repos) SubmitReposPB(url string) (*Repos, error) {
log.Info("httpPost() failed:", err)
return nil, err
}
+ log.Info("httpPost() worked with url:", url, "len(body) =", len(body))
if err := r.Unmarshal(body); err != nil {
- log.Info("Unmarshal() failed:", err)
+ log.Info("SubmitReposPB() Unmarshal() failed:", err)
+ log.Printf("%s\n", body)
return nil, err
}
diff --git a/reloadTags.go b/reloadTags.go
index 9017171..ce25b0c 100644
--- a/reloadTags.go
+++ b/reloadTags.go
@@ -11,6 +11,13 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
+// redo this. use go-git2 ?
+func (repo *Repo) allCommits() error {
+ return nil
+}
+
+/*
+// this is dumb
func (repo *Repo) AllCommits() error {
// tags := []string{"cd", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"}
// format := strings.Join(tags, "_,,,_%")
@@ -27,6 +34,7 @@ func (repo *Repo) AllCommits() error {
repo.Times.NewestCommit = timestamppb.New(tmp)
return nil
}
+*/
// reload the tags
func (repo *Repo) reloadGitTags() error {