dcb0fb74c5
- Add advertise_refs functionality for Git protocol communication - Implement archive service with TAR/ZIP format support and streaming - Create blame service for Git file annotation with line tracking - Add branch management including create, delete, rename and compare operations - Implement merge checking with conflict detection and fast-forward handling - Add cherry-pick functionality for applying commits between branches - Integrate gix library for Git repository operations and object handling - Add comprehensive test suite covering all Git operations - Implement proper error handling and repository validation - Add pagination support for large result sets - Create protobuf definitions for all Git operations and data structures - Add build system for gRPC code generation and dependency management
65 lines
1.3 KiB
Protocol Buffer
65 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package gitks;
|
|
|
|
// Git object hash algorithm. GitHub and Gitaly both need to support SHA-1 today
|
|
// and SHA-256 repositories as they become more common.
|
|
enum ObjectFormat {
|
|
OBJECT_FORMAT_UNSPECIFIED = 0;
|
|
OBJECT_FORMAT_SHA1 = 1;
|
|
OBJECT_FORMAT_SHA256 = 2;
|
|
}
|
|
|
|
// Git object kind.
|
|
enum ObjectType {
|
|
OBJECT_TYPE_UNSPECIFIED = 0;
|
|
OBJECT_TYPE_COMMIT = 1;
|
|
OBJECT_TYPE_TREE = 2;
|
|
OBJECT_TYPE_BLOB = 3;
|
|
OBJECT_TYPE_TAG = 4;
|
|
}
|
|
|
|
// Canonical object id. `value` preserves the original binary representation used
|
|
// by the existing API; `hex` is the normalized lowercase hex form for clients.
|
|
message Oid {
|
|
bytes value = 1;
|
|
string hex = 2;
|
|
ObjectFormat format = 3;
|
|
}
|
|
|
|
message ObjectName {
|
|
// Revision expression, refname, oid hex, or pseudo-ref such as HEAD.
|
|
string revision = 1;
|
|
}
|
|
|
|
message ObjectSelector {
|
|
oneof selector {
|
|
Oid oid = 1;
|
|
ObjectName revision = 2;
|
|
}
|
|
}
|
|
|
|
message ObjectIdentity {
|
|
Oid oid = 1;
|
|
ObjectType type = 2;
|
|
int64 size = 3;
|
|
string abbreviated_oid = 4;
|
|
}
|
|
|
|
message Pagination {
|
|
uint32 page_size = 1;
|
|
string page_token = 2;
|
|
}
|
|
|
|
message PageInfo {
|
|
string next_page_token = 1;
|
|
bool has_next_page = 2;
|
|
uint64 total_count = 3;
|
|
}
|
|
|
|
enum SortDirection {
|
|
SORT_DIRECTION_UNSPECIFIED = 0;
|
|
SORT_DIRECTION_ASC = 1;
|
|
SORT_DIRECTION_DESC = 2;
|
|
}
|