File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ impl Graph {
32
32
}
33
33
let mut others = HashSet :: default ( ) ;
34
34
for ( line, i) in self . lines . iter ( ) . zip ( 0 ..) {
35
+ buf. resize ( line. vertex . end - line. vertex . start , 0 ) ;
35
36
changes
36
37
. get_contents (
37
38
|h| txn. get_external ( & h) . unwrap ( ) . map ( |x| x. into ( ) ) ,
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ pub(crate) fn find_alive_down<'a, T: GraphTxnT>(
23
23
cache. insert ( * vertex, Some ( alive. clone ( ) ) ) ;
24
24
if stack. is_empty ( ) {
25
25
// Done!
26
- return Ok ( cache. get ( & vertex0) . unwrap ( ) ) ;
26
+ assert_eq ! ( vertex0. start_pos( ) , vertex. start_pos( ) ) ;
27
+ return Ok ( cache. get ( & vertex) . unwrap ( ) ) ;
27
28
}
28
29
continue ;
29
30
} else {
@@ -117,7 +118,8 @@ pub fn find_alive_up<'a, T: GraphTxnT>(
117
118
cache. insert ( vertex, ( Some ( alive) , files_) ) ;
118
119
if stack. is_empty ( ) {
119
120
// 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 ) ;
121
123
}
122
124
continue ;
123
125
} else {
Original file line number Diff line number Diff line change @@ -1104,7 +1104,7 @@ impl Recorded {
1104
1104
if !moved. edges . is_empty ( ) {
1105
1105
// If there was exactly one alive name, this is a regular
1106
1106
// 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 ) {
1108
1108
debug ! ( "need_new_name {:?}" , item. v_papa) ;
1109
1109
let add = if moved. need_new_name && !is_resurrected {
1110
1110
moved. edges . extend ( moved. alive . drain ( ..) ) ;
You can’t perform that action at this time.
0 commit comments