feat(tree): add recent commit metadata and LFS support to file metadata

- Added RecentCommit message definition with oid, subject and timestamp fields
- Extended TreeEntry, Tree, and FileMetadata messages with is_lfs and recent_commit fields
- Updated get_file_metadata function to include recent commit information
- Added tree module import and recent_commit lookup functionality
- Updated protobuf definitions to include new metadata fields
- Enhanced file metadata response with LFS status and commit history
This commit is contained in:
zhenyi
2026-06-04 13:47:46 +08:00
parent dcb0fb74c5
commit 737e934043
8 changed files with 83 additions and 9 deletions
+12
View File
@@ -5,6 +5,12 @@ package gitks;
import "oid.proto";
import "repository.proto";
message RecentCommit {
Oid oid = 1;
string subject = 2;
int64 committed_timestamp = 3;
}
message TreeEntry {
enum EntryType {
TREE_ENTRY_TYPE_UNSPECIFIED = 0;
@@ -21,6 +27,8 @@ message TreeEntry {
EntryType type = 4;
uint32 mode = 5;
int64 size = 6;
bool is_lfs = 7;
RecentCommit recent_commit = 8;
}
message Tree {
@@ -39,6 +47,8 @@ message Blob {
string encoding = 6;
bool binary = 7;
bool truncated = 8;
bool is_lfs = 9;
RecentCommit recent_commit = 10;
}
message FileMetadata {
@@ -48,6 +58,8 @@ message FileMetadata {
int64 size = 4;
ObjectType type = 5;
bool binary = 6;
bool is_lfs = 7;
RecentCommit recent_commit = 8;
}
message ListTreeRequest {