diff --git a/lib/src/local_backend.rs b/lib/src/local_backend.rs index a38fcaa6b..a3f674f09 100644 --- a/lib/src/local_backend.rs +++ b/lib/src/local_backend.rs @@ -279,6 +279,7 @@ pub fn commit_to_proto(commit: &Commit) -> crate::protos::local_store::Commit { for predecessor in &commit.predecessors { proto.predecessors.push(predecessor.to_bytes()); } + proto.uses_tree_conflict_format = commit.uses_tree_conflict_format; let conflict = crate::protos::local_store::TreeConflict { removes: commit .root_tree @@ -314,7 +315,7 @@ fn commit_from_proto(proto: crate::protos::local_store::Commit) -> Commit { parents, predecessors, root_tree, - uses_tree_conflict_format: true, + uses_tree_conflict_format: proto.uses_tree_conflict_format, change_id, description: proto.description, author: signature_from_proto(proto.author.unwrap_or_default()), diff --git a/lib/src/protos/local_store.proto b/lib/src/protos/local_store.proto index 9186e17ec..7e8a1d9ee 100644 --- a/lib/src/protos/local_store.proto +++ b/lib/src/protos/local_store.proto @@ -48,6 +48,8 @@ message Commit { repeated bytes parents = 1; repeated bytes predecessors = 2; TreeConflict root_tree = 3; + // TODO(#1624): delete when all code paths can handle this format + bool uses_tree_conflict_format = 8; bytes change_id = 4; string description = 5; diff --git a/lib/src/protos/local_store.rs b/lib/src/protos/local_store.rs index 9ead47759..13c09c1d4 100644 --- a/lib/src/protos/local_store.rs +++ b/lib/src/protos/local_store.rs @@ -61,6 +61,9 @@ pub struct Commit { pub predecessors: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, #[prost(message, optional, tag = "3")] pub root_tree: ::core::option::Option, + /// TODO(#1624): delete when all code paths can handle this format + #[prost(bool, tag = "8")] + pub uses_tree_conflict_format: bool, #[prost(bytes = "vec", tag = "4")] pub change_id: ::prost::alloc::vec::Vec, #[prost(string, tag = "5")]