From 32d4a18a23f2060b5f5dc312bef8fd7975386125 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 14 Oct 2025 22:17:22 -0500 Subject: patchId is the only thing we care about --- stat.OpenStats.go | 24 ++++++++++++++++++++++++ stat.proto | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 stat.OpenStats.go diff --git a/stat.OpenStats.go b/stat.OpenStats.go new file mode 100644 index 0000000..9e53fa2 --- /dev/null +++ b/stat.OpenStats.go @@ -0,0 +1,24 @@ +// Code generated by go.wit.com/apps/autogenpb DO NOT EDIT. +// go install go.wit.com/apps/autogenpb@latest +// +// This file was autogenerated with autogenpb: +// autogenpb v0.5.24 Built on 2025/10/14 23:24:11 ( 3 h) +// Theese sort.pb.go and marshal.pb.go files are autogenerated +// The autogenpb sources have example .proto files with instructions +// + +package gitpb + +import ( + "path/filepath" + + "go.wit.com/lib/config" +) + +func (r *Repo) LoadStats() (*Stats, error) { + filename := filepath.Join(r.FullPath, ".git/", "stats.pb") + pb := NewStats() + pb.Filename = filename + err := config.LoadPB(pb) + return pb, err +} diff --git a/stat.proto b/stat.proto index 7c51b30..7693660 100644 --- a/stat.proto +++ b/stat.proto @@ -13,8 +13,8 @@ message Stat { REMOTE = 2; TAG = 3; } - string hash = 1; // `autogenpb:unique` // git hash - string patchId = 2; // `autogenpb:unique` // git hash + string patchId = 1; // `autogenpb:unique` // git hash + string hash = 2; // `autogenpb:unique` // git hash google.protobuf.Timestamp mtime = 3; // mtime for the .git/config file string name = 4; // string remote = 5; // blank unless REMOTE -- cgit v1.2.3