mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
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.
This commit is contained in:
parent
f7b14beacc
commit
b8ca9ae806
1 changed files with 1 additions and 4 deletions
|
|
@ -646,11 +646,8 @@ fn serialize_extras(commit: &Commit) -> Vec<u8> {
|
|||
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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue