We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3eb8699 commit 4383b3dCopy full SHA for 4383b3d
1 file changed
asyncgit/src/graph/buffer.rs
@@ -88,16 +88,15 @@ impl Buffer {
88
89
if let Some(mut c) = self.current[index].clone() {
90
let changed = new_chunk.alias.is_some_and(|alias| {
91
- let mut changed = false;
92
- if c.parent_a == Some(alias) {
+ let a = c.parent_a == Some(alias);
+ let b = c.parent_b == Some(alias);
93
+ if a {
94
c.parent_a = None;
- changed = true;
95
}
96
- if c.parent_b == Some(alias) {
+ if b {
97
c.parent_b = None;
98
99
100
- changed
+ a || b
101
});
102
103
if changed {
0 commit comments