Fix bugs with applying hunks from branch buffers (#18721)

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
Max Brunsfeld 2024-10-07 16:28:33 -07:00 committed by GitHub
parent 3c91184726
commit b0a16a7601
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 128 additions and 61 deletions

View file

@ -216,10 +216,11 @@ impl fmt::Debug for Global {
if timestamp.replica_id > 0 {
write!(f, ", ")?;
}
write!(f, "{}: {}", timestamp.replica_id, timestamp.value)?;
}
if self.local_branch_value > 0 {
write!(f, "<branch>: {}", self.local_branch_value)?;
if timestamp.replica_id == LOCAL_BRANCH_REPLICA_ID {
write!(f, "<branch>: {}", timestamp.value)?;
} else {
write!(f, "{}: {}", timestamp.replica_id, timestamp.value)?;
}
}
write!(f, "}}")
}