diff options
| author | Jeff Carr <[email protected]> | 2025-10-15 03:35:46 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-15 03:35:46 -0500 |
| commit | 048d8a5037fe6c3b275a9445dfeee3a5188a9453 (patch) | |
| tree | 159d62fbf252bd511c652484d7ebc59d2ce1bd90 | |
| parent | dd0d7c51556ff0d98548a5ef621a6e36c8e4902b (diff) | |
set stat.Type to REMOTE
| -rw-r--r-- | doPatch.go | 2 | ||||
| -rw-r--r-- | doStats.go | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -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() @@ -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 |
