From 683522ee46da7ce97fa4948ef3e9ebb951a44c1e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 30 Jun 2025 07:45:30 -0500 Subject: [PATCH] version v4: use 'namespace' as primary field --- Makefile | 2 +- repo.proto | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a486984..73ee15e 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ goimports: # dump autogenerated files and potential patches clean: rm -f *.pb.go go.* *.patch - go-mod-clean --purge + go-mod-clean purge #refs.pb.go: refs.proto # cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \ diff --git a/repo.proto b/repo.proto index 43d3d07..8389a22 100644 --- a/repo.proto +++ b/repo.proto @@ -12,6 +12,7 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time // global settings for autogenpb `autogenpb:mutex` // should it be done this way? + message GitTimes { // `autogenpb:nomutex` google.protobuf.Timestamp lastPull = 1; // last time a git pull was done google.protobuf.Timestamp lastUpdate = 2; // when was ReloadGit() last done @@ -42,7 +43,8 @@ message GoInfo { // `autogenpb } message Repo { // `autogenpb:marshal` `autogenpb:nomutex` - string fullPath = 1; // `autogenpb:unique` `autogenpb:sort` // the actual path to the .git directory: '/home/devel/golang.org/x/tools' + string namespace = 1; // `autogenpb:sort` // this repo is 'go.wit.com/lib/protobuf/gitpb' + string fullPath = 2; // `autogenpb:unique` `autogenpb:sort` // the OS path to the .git directory: '/home/devel/golang.org/x/tools' string masterBranchName = 3; // git 'main' or 'master' branch name string develBranchName = 4; // whatever the git 'devel' branch name is string userBranchName = 5; // whatever your username branch is @@ -70,7 +72,7 @@ message Repo { // `autogenpb message Repos { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:nomutex` `autogenpb:gui` string uuid = 1; // `autogenpb:uuid:8daaeba1-fb1f-4762-ae6e-95a55d352673` - string version = 2; // `autogenpb:version:v3` + string version = 2; // `autogenpb:version:v4` repeated Repo repos = 3; // `autogenpb:append` // generate AppendUnique() function for this bool hasFullScan = 4; // a full repo scan has been saved to disk google.protobuf.Timestamp fullScan = 5; // mtime of the last full scan saved to disk