summaryrefslogtreecommitdiff
path: root/stat.proto
blob: 2adcf287a9c53ee45465291a1dda4c1a09f10c90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2025 WIT.COM Inc Licensed GPL 3.0

syntax = "proto3";

package gitpb;

import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp

message Stat {
        enum RefType {
                UNKNOWN = 0;
                LOCAL  = 1;
                REMOTE = 2;
                TAG    = 3;
        }
        string                      patchId      = 1;  // `autogenpb:unique` `autogenpb:sort`
        string                      hash         = 2;  // `autogenpb:unique` // git hash
        google.protobuf.Timestamp   ctime        = 3;  // `autogenpb:unique` `autogenpb:sort`
        string                      name         = 4;  //
        string                      remote       = 5;  // blank unless REMOTE
        RefType                     type         = 6;  // is set by git as the master branch
        string                      subject      = 7;  // git tag subject
}
// .git/ stats
message Stats {                                        // `autogenpb:marshal` `autogenpb:gui` `autogenpb:http`
        string                      uuid         = 1;  // `autogenpb:uuid:ba236558-f8a1-4c47-a14a-8856a24d3f72`
        string                      version      = 2;  // `autogenpb:version:v0.0.1`
        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 .git/
}