-
Notifications
You must be signed in to change notification settings - Fork 424
lore-proto, lore-revision, lore-server: opt-in last-commit attribution on RevisionTree #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,6 +117,23 @@ message DiffPartition { | |
| bytes link_partition = 2; | ||
| } | ||
|
|
||
| // The revision that last modified a tree entry. Directories report the | ||
| // revision of the most recent change anywhere beneath them. | ||
| message TreeCommit { | ||
| // Content signature of the revision. | ||
| bytes signature = 1; | ||
| // Free-form commit message. | ||
| string commit_message = 2; | ||
| // Commit timestamp (Unix epoch milliseconds). | ||
| uint64 timestamp = 3; | ||
| // Resolved (branch, number) of the revision. Carried in full rather than as | ||
| // a bare number because the number is per-branch and this is not enough to | ||
| // describe its' provenance | ||
| lore.model.v1.RevisionIdentifier identifier = 4; | ||
| // Identity that committed the revision. | ||
| string committed_by = 5; | ||
| } | ||
|
|
||
| // A single entry in a revision tree listing. | ||
| message TreeNode { | ||
| // Repository-relative path of this entry. | ||
|
|
@@ -132,6 +149,10 @@ message TreeNode { | |
| // True when a link entry tracks its parent's branch; false for pinned links | ||
| // and non-link entries. | ||
| bool tracking = 6; | ||
| // Revision that last modified this entry, set only when the request asks | ||
| // for it. Absent wherever the server cannot attribute an entry - most | ||
| // commonly the repository root. | ||
| optional TreeCommit last_commit = 7; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this field will be the same for potentially a large number of files I would rather have it in a separate list of unique revisions, and the tree node refer to the revision by index into the list.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the revision list could be arbitrarily long, it should go as a separate |
||
| } | ||
|
|
||
| // Self-describing revision record. Carries the resolved RevisionIdentifier | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of introducing a new type I would suggest using the
Revisiontype in the thin client proto model