auto formatting with autogenpb

This commit is contained in:
Jeff Carr 2025-02-01 12:01:42 -06:00
parent d62954bb63
commit 7cacc395ef
3 changed files with 94 additions and 94 deletions

View File

@ -4,38 +4,38 @@ 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 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 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
}
// readGitConfig reads and parses the .git/config file
message GitConfig { // `autogenpb:nomutex`
map<string, string> core = 1; // map[origin] = "https:/git.wit.org/gui/gadgets"
map<string, GitRemote> remotes = 2; // map[origin] = "https:/git.wit.org/gui/gadgets"
map<string, GitBranch> branches = 3; // map[guimaster] = origin guimaster
map<string, string> submodules = 4;
map<string, string> hashes = 5;
map<string, string> versions = 6;
repeated GitBranch local = 7; // move this this and away from the map<> variables
message GitConfig { // `autogenpb:nomutex`
map<string, string> core = 1; // map[origin] = "https:/git.wit.org/gui/gadgets"
map<string, GitRemote> remotes = 2; // map[origin] = "https:/git.wit.org/gui/gadgets"
map<string, GitBranch> branches = 3; // map[guimaster] = origin guimaster
map<string, string> submodules = 4;
map<string, string> hashes = 5;
map<string, string> versions = 6;
repeated GitBranch local = 7; // move this this and away from the map<> variables
}
message GitTag { // `autogenpb:nomutex`
string refname = 1; // `autogenpb:unique` `autogenpb:sort` // tag name. treated as unique
google.protobuf.Timestamp creatordate = 2; // git creatordate
google.protobuf.Timestamp authordate = 3; // git author date
string hash = 4; // `autogenpb:unique` // git hash
string subject = 5; // git tag subject
message GitTag { // `autogenpb:nomutex`
string refname = 1; // `autogenpb:unique` `autogenpb:sort` // tag name. treated as unique
google.protobuf.Timestamp creatordate = 2; // git creatordate
google.protobuf.Timestamp authordate = 3; // git author date
string hash = 4; // `autogenpb:unique` // git hash
string subject = 5; // git tag subject
}
message GitTags { // `autogenpb:marshal` `autogenpb:nomutex`
string uuid = 1; // `autogenpb:uuid:ffdff813-0316-4372-9e82-4c1c7d202526`
string version = 2; // `autogenpb:version:v0.0.47`
repeated GitTag gitTags = 3;
message GitTags { // `autogenpb:marshal` `autogenpb:nomutex`
string uuid = 1; // `autogenpb:uuid:ffdff813-0316-4372-9e82-4c1c7d202526`
string version = 2; // `autogenpb:version:v0.0.47`
repeated GitTag gitTags = 3;
}

View File

@ -8,16 +8,16 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time
// global settings for autogenpb `autogenpb:mutex`
message GoDep { // `autogenpb:nomutex`
string hash = 1; // `autogenpb:unique` `autogenpb:sort` // md5sum/hash value from the go.sum file
google.protobuf.Timestamp ctime = 2; // get the go date from 'go list' ?
string version = 3; // v1.2.2
string goPath = 4; // `autogenpb:unique` `autogenpb:sort` // "go.wit.com/lib/foo"
string goVersion = 5; // version of golang the developer used to make this package version
message GoDep { // `autogenpb:nomutex`
string hash = 1; // `autogenpb:unique` `autogenpb:sort` // md5sum/hash value from the go.sum file
google.protobuf.Timestamp ctime = 2; // get the go date from 'go list' ?
string version = 3; // v1.2.2
string goPath = 4; // `autogenpb:unique` `autogenpb:sort` // "go.wit.com/lib/foo"
string goVersion = 5; // version of golang the developer used to make this package version
}
message GoDeps { // `autogenpb:nomutex`
string uuid = 1; // `autogenpb:uuid:7de62c09-b335-4d80-902d-08552c501b7c`
string version = 2; // `autogenpb:version:v0.0.51`
repeated GoDep goDeps = 3; // `autogenpb:unique` `autogenpb:sort`
message GoDeps { // `autogenpb:nomutex`
string uuid = 1; // `autogenpb:uuid:7de62c09-b335-4d80-902d-08552c501b7c`
string version = 2; // `autogenpb:version:v0.0.51`
repeated GoDep goDeps = 3; // `autogenpb:unique` `autogenpb:sort`
}

View File

@ -11,67 +11,67 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time
// global settings for autogenpb `autogenpb:mutex`
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 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
bool dirty = 6; // if git says things have been changed
string URL = 7; // the URL
GitTags tags = 8; // known tags
GitTimes times = 9; // store all the mtime values here. these are temporary
GoInfo goInfo = 10; // put all the go specifcs here
GoDeps goDeps = 11; // what is in the go.sum file
string currentBranchName = 12; // the branch currently checked out
string currentBranchVersion = 13; // the branch currently checked out
string lastTag = 14; // the oldest tag
string targetVersion = 15; // useful during the package release process
bool readOnly = 16; // tracks access to 'git push'
string desc = 17; // what is this repo?
string stateChange = 18; // used for debugging tool logic
string masterVersion = 19; // just store this for now
string develVersion = 20; //
string userVersion = 21; //
repeated string dirtyList = 22; // store the list from git status --porcelain
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
}
message Repos { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:nomutex`
string uuid = 1; // `autogenpb:uuid:8daaeba1-fb1f-4762-ae6e-95a55d352673`
string version = 2; // `autogenpb:version:v3`
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
}
// 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
google.protobuf.Timestamp lastDirty = 3; // last time CheckDirty() was run
google.protobuf.Timestamp mtimeDir = 4; // mtime for ./git // maybe useful to track
google.protobuf.Timestamp mtimeHead = 5; // mtime for ./git/HEAD // these two mtimes allow really fast checks to see if git has changed
google.protobuf.Timestamp mtimeIndex = 6; // mtime for ./git/HEAD // probably always in sync with HEAD
google.protobuf.Timestamp mtimeFetch = 7; // mtime for ./git/FETCH_HEAD // last time 'git fetch' or 'git pull' was run on current branch?
google.protobuf.Timestamp lastGoDep = 8; // mtime for last go.sum scan
google.protobuf.Timestamp newestCommit = 9; // when the newest commit was
google.protobuf.Timestamp mtimeConfig = 10; // mtime for the .git/config file
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
google.protobuf.Timestamp lastDirty = 3; // last time CheckDirty() was run
google.protobuf.Timestamp mtimeDir = 4; // mtime for ./git // maybe useful to track
google.protobuf.Timestamp mtimeHead = 5; // mtime for ./git/HEAD // these two mtimes allow really fast checks to see if git has changed
google.protobuf.Timestamp mtimeIndex = 6; // mtime for ./git/HEAD // probably always in sync with HEAD
google.protobuf.Timestamp mtimeFetch = 7; // mtime for ./git/FETCH_HEAD // last time 'git fetch' or 'git pull' was run on current branch?
google.protobuf.Timestamp lastGoDep = 8; // mtime for last go.sum scan
google.protobuf.Timestamp newestCommit = 9; // when the newest commit was
google.protobuf.Timestamp mtimeConfig = 10; // mtime for the .git/config file
}
// this is probably better. think about moving to this instead
message GoInfo { // `autogenpb:nomutex`
string goPath = 1; // the logical path as used by golang: 'go.wit.com/apps/helloworld'
string desc = 2; // what is this repo?
bool goLibrary = 3; // is this a golang library?
bool goBinary = 4; // is this a golang binary?
bool goPrimitive = 5; // if this is a golang primitive (only has go.mod)
bool goPlugin = 6; // is this a golang plugin?
bool goProtobuf = 7; // autogen go files from .proto
GoDeps goDeps = 8; // what is in the go.sum file
GoDeps published = 9; // the last published go.mod/go.sum
bytes goMod = 10; // the last go.mod file
bytes goSum = 11; // the last go.sum file
bool gitIgnoresGoSum = 12; // does .gitignore ignore go.mod & go.sum?
message GoInfo { // `autogenpb:nomutex`
string goPath = 1; // the logical path as used by golang: 'go.wit.com/apps/helloworld'
string desc = 2; // what is this repo?
bool goLibrary = 3; // is this a golang library?
bool goBinary = 4; // is this a golang binary?
bool goPrimitive = 5; // if this is a golang primitive (only has go.mod)
bool goPlugin = 6; // is this a golang plugin?
bool goProtobuf = 7; // autogen go files from .proto
GoDeps goDeps = 8; // what is in the go.sum file
GoDeps published = 9; // the last published go.mod/go.sum
bytes goMod = 10; // the last go.mod file
bytes goSum = 11; // the last go.sum file
bool gitIgnoresGoSum = 12; // does .gitignore ignore go.mod & go.sum?
}
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 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
bool dirty = 6; // if git says things have been changed
string URL = 7; // the URL
GitTags tags = 8; // known tags
GitTimes times = 9; // store all the mtime values here. these are temporary
GoInfo goInfo = 10; // put all the go specifcs here
GoDeps goDeps = 11; // what is in the go.sum file
string currentBranchName = 12; // the branch currently checked out
string currentBranchVersion = 13; // the branch currently checked out
string lastTag = 14; // the oldest tag
string targetVersion = 15; // useful during the package release process
bool readOnly = 16; // tracks access to 'git push'
string desc = 17; // what is this repo?
string stateChange = 18; // used for debugging tool logic
string masterVersion = 19; // just store this for now
string develVersion = 20; //
string userVersion = 21; //
repeated string dirtyList = 22; // store the list from git status --porcelain
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
}
message Repos { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:nomutex`
string uuid = 1; // `autogenpb:uuid:8daaeba1-fb1f-4762-ae6e-95a55d352673`
string version = 2; // `autogenpb:version:v3`
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
}