Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorick@yorickpeterse.com>2020-11-26 18:38:52 +0300
committerYorick Peterse <yorick@yorickpeterse.com>2020-12-19 18:25:03 +0300
commit3236114adbeb792c156f9cb222f4f05ac69baaae (patch)
treeeb5bbb800737c2475936cdc5603a1bdaa1171f53 /proto/shared.proto
parent1facf5b1b4bec64ee4f74b45e5c6df934279311e (diff)
Parse Git commit trailers when processing commits
This adds support for parsing Git trailers (https://git-scm.com/docs/git-interpret-trailers). GitLab will use these trailers to generate changelog information, as part of the epic https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/351. Parsing is done by parsing the output of `git log` when finding multiple commits, and by parsing the output of `git show` when finding a single commit. The Go parser is written such that it allocates as few objects as possible, making it possible to efficiently parse trailers; even when listing thousands of commits. See https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/1364 for more information.
Diffstat (limited to 'proto/shared.proto')
-rw-r--r--proto/shared.proto14
1 files changed, 14 insertions, 0 deletions
diff --git a/proto/shared.proto b/proto/shared.proto
index 19ec94630..1d85f3309 100644
--- a/proto/shared.proto
+++ b/proto/shared.proto
@@ -48,6 +48,15 @@ message Repository {
string gl_project_path = 8;
}
+// A single Git trailer (https://git-scm.com/docs/git-interpret-trailers)
+// key-value pair.
+message CommitTrailer {
+ // The key of the trailer, such as `Signed-off-by`.
+ bytes key = 1;
+ // The value of the trailer, such as `Alice <alice@gmail.com>`.
+ bytes value = 2;
+}
+
// Corresponds to Gitlab::Git::Commit
message GitCommit {
string id = 1;
@@ -66,6 +75,11 @@ message GitCommit {
// the value will be `4b825dc642cb6eb9a060e54bf8d69288fbee4904`.
// That value is equivalent to `git hash-object -t tree /dev/null`
string tree_id = 9;
+ // The list of Git trailers (https://git-scm.com/docs/git-interpret-trailers)
+ // found in this commit's message. The number of trailers and their key/value
+ // sizes are limited. If a trailer exceeds these size limits, it and any
+ // trailers that follow it are not included.
+ repeated CommitTrailer trailers = 10;
}
message CommitAuthor {