From 048d8a5037fe6c3b275a9445dfeee3a5188a9453 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 15 Oct 2025 03:35:46 -0500 Subject: set stat.Type to REMOTE --- doPatch.go | 2 +- doStats.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doPatch.go b/doPatch.go index 3aa07e7..e0f697e 100644 --- a/doPatch.go +++ b/doPatch.go @@ -40,7 +40,7 @@ func doPatch() (string, error) { me.curpatches = forgepb.NewPatches() me.curpatches.Filename = config.Get("curpatches") if me.curpatches.Filename == "" { - panic("config failed") + panic("config failed. no 'curpatches' set in ~/.config/forge/config.text") } if err := me.curpatches.Load(); err != nil { me.curpatches.Save() diff --git a/doStats.go b/doStats.go index 09ec0c7..f379562 100644 --- a/doStats.go +++ b/doStats.go @@ -127,10 +127,13 @@ func makeFmts() string { return "--format=" + strings.Join(all, standardSeperator) } +// the correct syntax for +// git log -n 8 --format=%H%00%ae%00%as%00%s origin/HEAD func last100(r *gitpb.Repo, pb *gitpb.Stats) (int, error) { var allerr error var counter int - cmd := []string{"git", "log", "-n", "100", makeFmts(), "origin/" + r.GetMasterBranchName()} + // cmd := []string{"git", "log", "-n", "100", makeFmts(), "origin/" + r.GetMasterBranchName()} + cmd := []string{"git", "log", "-n", "100", makeFmts(), "origin/HEAD"} if config.If("stats") { log.Info("Run:", cmd) } @@ -153,6 +156,7 @@ func last100(r *gitpb.Repo, pb *gitpb.Stats) (int, error) { allerr = errors.Join(allerr, err) astat.Ctime = timestamppb.New(*ctime) astat.Subject = parts[4] + astat.Type = gitpb.Stat_REMOTE pb.Append(astat) } return counter, allerr -- cgit v1.2.3