summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--stat.SaveVerbose.go25
-rw-r--r--stat.proto4
3 files changed, 34 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9d20fa2..90c6810 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,15 @@
all: repo.pb.go goimports vet
+ autogenpb --proto stat.proto
+ autogenpb --proto gitTag.proto
+ autogenpb --proto goDep.proto
+ autogenpb --proto repo.proto
@echo This GO code passes the compile checks
proto-renumber: clean
autogenpb --renumber --proto stat.proto
+ autogenpb --renumber --proto gitTag.proto
+ autogenpb --renumber --proto goDep.proto
+ autogenpb --renumber --proto repo.proto
make goimports vet
repo.pb.go: repo.proto
diff --git a/stat.SaveVerbose.go b/stat.SaveVerbose.go
new file mode 100644
index 0000000..5505481
--- /dev/null
+++ b/stat.SaveVerbose.go
@@ -0,0 +1,25 @@
+// 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/15 04:52:04 ( 17 s)
+// Theese sort.pb.go and marshal.pb.go files are autogenerated
+// The autogenpb sources have example .proto files with instructions
+//
+
+package gitpb
+
+import (
+ "go.wit.com/lib/config"
+ "go.wit.com/log"
+)
+
+func (pb *Stats) SaveVerbose() error {
+ err := config.SavePB(pb)
+ if err == nil {
+ log.Printf("Saved %s with len(%d) hashes.\n", pb.Filename, pb.Len())
+ } else {
+ log.Printf("Save err %s with len(%d) hashes. err(%v)\n", pb.Filename, pb.Len(), err)
+ }
+ return err
+}
diff --git a/stat.proto b/stat.proto
index 7693660..4a2ccc1 100644
--- a/stat.proto
+++ b/stat.proto
@@ -15,7 +15,7 @@ message Stat {
}
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
+ google.protobuf.Timestamp ctime = 3; // ctime for the .git/config file
string name = 4; //
string remote = 5; // blank unless REMOTE
RefType type = 6; // is set by git as the master branch
@@ -28,5 +28,5 @@ message Stats { // `autogenpb:marshal` `a
repeated Stat stats = 3;
string filename = 4; // `autogenpb:save` -- this enables autogenerated pb.Load() and pb.Save()
string head = 5; // the current origin hash
- google.protobuf.Timestamp mtime = 6; // mtime for the .git/config file
+ google.protobuf.Timestamp mtime = 6; // mtime for .git/
}