Skip to content

Commit 8b948d9

Browse files
author
fossdd
committed
Update pijul
1 parent fcfdf53 commit 8b948d9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

libpijul/src/alive/debug.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ impl Graph {
3232
}
3333
let mut others = HashSet::default();
3434
for (line, i) in self.lines.iter().zip(0..) {
35+
buf.resize(line.vertex.end - line.vertex.start, 0);
3536
changes
3637
.get_contents(
3738
|h| txn.get_external(&h).unwrap().map(|x| x.into()),

libpijul/src/find_alive.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ pub(crate) fn find_alive_down<'a, T: GraphTxnT>(
2323
cache.insert(*vertex, Some(alive.clone()));
2424
if stack.is_empty() {
2525
// Done!
26-
return Ok(cache.get(&vertex0).unwrap());
26+
assert_eq!(vertex0.start_pos(), vertex.start_pos());
27+
return Ok(cache.get(&vertex).unwrap());
2728
}
2829
continue;
2930
} else {
@@ -117,7 +118,8 @@ pub fn find_alive_up<'a, T: GraphTxnT>(
117118
cache.insert(vertex, (Some(alive), files_));
118119
if stack.is_empty() {
119120
// Done!
120-
return Ok(&cache.get(&vertex0).unwrap().0);
121+
assert_eq!(vertex.end_pos(), vertex0.end_pos());
122+
return Ok(&cache.get(&vertex).unwrap().0);
121123
}
122124
continue;
123125
} else {

libpijul/src/record.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ impl Recorded {
11041104
if !moved.edges.is_empty() {
11051105
// If there was exactly one alive name, this is a regular
11061106
// move, i.e. not a conflict.
1107-
if moved.n_alive_names == 1 {
1107+
if moved.n_alive_names == 1 || (moved.need_new_name && !is_resurrected) {
11081108
debug!("need_new_name {:?}", item.v_papa);
11091109
let add = if moved.need_new_name && !is_resurrected {
11101110
moved.edges.extend(moved.alive.drain(..));

0 commit comments

Comments
 (0)