From b8ca9ae806e768c8a1e1d814ac78dc468232efd6 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sat, 22 Mar 2025 23:39:30 -0700 Subject: [PATCH] git_backend: stop writing tree ids to proto We have been writing conflicted tree ids to the `jj:trees` commit header since 4d426049 (just over a year ago) and we have been able to read them from there since the same commit. This patch updates the write path so we no longer redundantly write the trees to the proto storage. --- lib/src/git_backend.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/src/git_backend.rs b/lib/src/git_backend.rs index e792b24ef..4d0780272 100644 --- a/lib/src/git_backend.rs +++ b/lib/src/git_backend.rs @@ -646,11 +646,8 @@ fn serialize_extras(commit: &Commit) -> Vec { change_id: commit.change_id.to_bytes(), ..Default::default() }; - if let MergedTreeId::Merge(tree_ids) = &commit.root_tree { + if matches!(commit.root_tree, MergedTreeId::Merge(_)) { proto.uses_tree_conflict_format = true; - if !tree_ids.is_resolved() { - proto.root_tree = tree_ids.iter().map(|r| r.to_bytes()).collect(); - } } for predecessor in &commit.predecessors { proto.predecessors.push(predecessor.to_bytes());