From da2910c708d29c6e2ab31ed22b81926621f5978e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 30 Oct 2025 23:15:45 -0500 Subject: start the process of dumping gitTag.proto --- Makefile | 10 ++-------- generate.go | 1 + gitConfig.proto | 32 ++++++++++++++++++++++++++++++++ gitTag.proto | 21 --------------------- repo.proto | 4 +--- 5 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 gitConfig.proto diff --git a/Makefile b/Makefile index d32afa0..2d7b8dd 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,11 @@ all: goimports proto vet proto: - autogenpb --proto stat.proto - autogenpb --proto gitTag.proto - autogenpb --proto goDep.proto - autogenpb --proto repo.proto + autogenpb # generates the .pb.go files @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 + autogenpb --renumber make goimports vet repo.pb.go: repo.proto diff --git a/generate.go b/generate.go index 476fde5..83ea747 100644 --- a/generate.go +++ b/generate.go @@ -10,3 +10,4 @@ package gitpb //go:generate autogenpb --proto goDep.proto //go:generate autogenpb --proto gitTag.proto //go:generate autogenpb --proto stat.proto +//go:generate autogenpb --proto gitConfig.proto diff --git a/gitConfig.proto b/gitConfig.proto new file mode 100644 index 0000000..0de9cd0 --- /dev/null +++ b/gitConfig.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +package gitpb; + +import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp + +message GitRemote { // `autogenpb:nomutex` + string url = 1; + string fetch = 2; +} + +message GitBranch { // `autogenpb:nomutex` + string remote = 1; // the name of the remote repo + string merge = 2; // the merge path from the config file + string name = 3; // the branch name from the config file +} + +message GitConfig { // `autogenpb:nomutex` + map core = 1; // map[origin] = "https:/git.wit.org/gui/gadgets" + map remotes = 2; // map[origin] = "https:/git.wit.org/gui/gadgets" + map branches = 3; // map[guimaster] = origin guimaster + map submodules = 4; + map hashes = 5; + map versions = 6; + repeated GitBranch local = 7; // move this away from the map<> variables +} + +message GitConfigs { // `autogenpb:marshal` `autogenpb:mutex` + string uuid = 1; // `autogenpb:uuid:e70b71ec-0326-4485-8460-4a3c4d7b6919` + string version = 2; // `autogenpb:version:v0.0.1` + repeated GitConfig GitConfigs = 3; // THIS MUST BE GitConfig and then GitConfigs +} diff --git a/gitTag.proto b/gitTag.proto index 69e3c3f..6302229 100644 --- a/gitTag.proto +++ b/gitTag.proto @@ -4,27 +4,6 @@ package gitpb; import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp -message GitRemote { // `autogenpb:nomutex` - string url = 1; - string fetch = 2; -} - -message GitBranch { // `autogenpb:nomutex` - string remote = 1; // the name of the remote repo - string merge = 2; // the merge path from the config file - string name = 3; // the branch name from the config file -} - -message GitConfig { // `autogenpb:nomutex` - map core = 1; // map[origin] = "https:/git.wit.org/gui/gadgets" - map remotes = 2; // map[origin] = "https:/git.wit.org/gui/gadgets" - map branches = 3; // map[guimaster] = origin guimaster - map submodules = 4; - map hashes = 5; - map versions = 6; - repeated GitBranch local = 7; // move this away from the map<> variables -} - message GitTag { // `autogenpb:nomutex` enum BranchType { ANY = 0; diff --git a/repo.proto b/repo.proto index a0cd192..f794ff5 100644 --- a/repo.proto +++ b/repo.proto @@ -7,7 +7,7 @@ package gitpb; import "gitTag.proto"; import "goDep.proto"; -// import "stat.proto"; +import "gitConfig.proto"; import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp // global settings for autogenpb `autogenpb:mutex` @@ -69,8 +69,6 @@ message Repo { // `autogenpb string state = 23; // status or state. useful for building tooling GitTag currentTag = 24; // used to examine repo branches GitConfig gitConfig = 25; // protobuf of the current .git/config - // map control = 26; // control values. can be used to make packages (like .deb or .rpm) - // Stats stats = 27; // rewrite the existing crappy code here } message Repos { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:gui` `autogenpb:nomutex` `autogenpb:http` -- cgit v1.2.3