Skip to main content

jujutsu_lib/protos/
op_store.rs

1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct RefConflict {
4    #[prost(bytes = "vec", repeated, tag = "1")]
5    pub removes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
6    #[prost(bytes = "vec", repeated, tag = "2")]
7    pub adds: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
8}
9#[allow(clippy::derive_partial_eq_without_eq)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct RefTarget {
12    #[prost(oneof = "ref_target::Value", tags = "1, 2")]
13    pub value: ::core::option::Option<ref_target::Value>,
14}
15/// Nested message and enum types in `RefTarget`.
16pub mod ref_target {
17    #[allow(clippy::derive_partial_eq_without_eq)]
18    #[derive(Clone, PartialEq, ::prost::Oneof)]
19    pub enum Value {
20        #[prost(bytes, tag = "1")]
21        CommitId(::prost::alloc::vec::Vec<u8>),
22        #[prost(message, tag = "2")]
23        Conflict(super::RefConflict),
24    }
25}
26#[allow(clippy::derive_partial_eq_without_eq)]
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct RemoteBranch {
29    #[prost(string, tag = "1")]
30    pub remote_name: ::prost::alloc::string::String,
31    #[prost(message, optional, tag = "2")]
32    pub target: ::core::option::Option<RefTarget>,
33}
34#[allow(clippy::derive_partial_eq_without_eq)]
35#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct Branch {
37    #[prost(string, tag = "1")]
38    pub name: ::prost::alloc::string::String,
39    /// Unset if the branch has been deleted locally.
40    #[prost(message, optional, tag = "2")]
41    pub local_target: ::core::option::Option<RefTarget>,
42    /// TODO: How would we support renaming remotes while having undo work? If
43    /// the remote name is stored in config, it's going to become a mess if the
44    /// remote is renamed but the configs are left unchanged. Should each remote
45    /// be identified (here and in configs) by a UUID?
46    #[prost(message, repeated, tag = "3")]
47    pub remote_branches: ::prost::alloc::vec::Vec<RemoteBranch>,
48}
49#[allow(clippy::derive_partial_eq_without_eq)]
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct GitRef {
52    #[prost(string, tag = "1")]
53    pub name: ::prost::alloc::string::String,
54    /// This field is just for historical reasons (before we had the RefTarget
55    /// type). New GitRefs have (only) the target field.
56    /// TODO: Delete support for the old format.
57    #[prost(bytes = "vec", tag = "2")]
58    pub commit_id: ::prost::alloc::vec::Vec<u8>,
59    #[prost(message, optional, tag = "3")]
60    pub target: ::core::option::Option<RefTarget>,
61}
62#[allow(clippy::derive_partial_eq_without_eq)]
63#[derive(Clone, PartialEq, ::prost::Message)]
64pub struct Tag {
65    #[prost(string, tag = "1")]
66    pub name: ::prost::alloc::string::String,
67    #[prost(message, optional, tag = "2")]
68    pub target: ::core::option::Option<RefTarget>,
69}
70#[allow(clippy::derive_partial_eq_without_eq)]
71#[derive(Clone, PartialEq, ::prost::Message)]
72pub struct View {
73    #[prost(bytes = "vec", repeated, tag = "1")]
74    pub head_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
75    #[prost(bytes = "vec", repeated, tag = "4")]
76    pub public_head_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
77    #[deprecated]
78    #[prost(bytes = "vec", tag = "2")]
79    pub wc_commit_id: ::prost::alloc::vec::Vec<u8>,
80    #[prost(map = "string, bytes", tag = "8")]
81    pub wc_commit_ids: ::std::collections::HashMap<
82        ::prost::alloc::string::String,
83        ::prost::alloc::vec::Vec<u8>,
84    >,
85    #[prost(message, repeated, tag = "5")]
86    pub branches: ::prost::alloc::vec::Vec<Branch>,
87    #[prost(message, repeated, tag = "6")]
88    pub tags: ::prost::alloc::vec::Vec<Tag>,
89    /// Only a subset of the refs. For example, does not include refs/notes/.
90    #[prost(message, repeated, tag = "3")]
91    pub git_refs: ::prost::alloc::vec::Vec<GitRef>,
92    /// This field is just for historical reasons (before we had the RefTarget
93    /// type). New Views have (only) the target field.
94    /// TODO: Delete support for the old format.
95    #[deprecated]
96    #[prost(bytes = "vec", tag = "7")]
97    pub git_head_legacy: ::prost::alloc::vec::Vec<u8>,
98    #[prost(message, optional, tag = "9")]
99    pub git_head: ::core::option::Option<RefTarget>,
100}
101#[allow(clippy::derive_partial_eq_without_eq)]
102#[derive(Clone, PartialEq, ::prost::Message)]
103pub struct Operation {
104    #[prost(bytes = "vec", tag = "1")]
105    pub view_id: ::prost::alloc::vec::Vec<u8>,
106    #[prost(bytes = "vec", repeated, tag = "2")]
107    pub parents: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
108    #[prost(message, optional, tag = "3")]
109    pub metadata: ::core::option::Option<OperationMetadata>,
110}
111/// TODO: Share with store.proto? Do we even need the timezone here?
112#[allow(clippy::derive_partial_eq_without_eq)]
113#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct Timestamp {
115    #[prost(int64, tag = "1")]
116    pub millis_since_epoch: i64,
117    #[prost(int32, tag = "2")]
118    pub tz_offset: i32,
119}
120#[allow(clippy::derive_partial_eq_without_eq)]
121#[derive(Clone, PartialEq, ::prost::Message)]
122pub struct OperationMetadata {
123    #[prost(message, optional, tag = "1")]
124    pub start_time: ::core::option::Option<Timestamp>,
125    #[prost(message, optional, tag = "2")]
126    pub end_time: ::core::option::Option<Timestamp>,
127    #[prost(string, tag = "3")]
128    pub description: ::prost::alloc::string::String,
129    #[prost(string, tag = "4")]
130    pub hostname: ::prost::alloc::string::String,
131    #[prost(string, tag = "5")]
132    pub username: ::prost::alloc::string::String,
133    #[prost(map = "string, string", tag = "6")]
134    pub tags: ::std::collections::HashMap<
135        ::prost::alloc::string::String,
136        ::prost::alloc::string::String,
137    >,
138}