Show More
@@ -4,6 +4,7 b' use crate::Revision;' | |||
|
4 | 4 | use crate::NULL_REVISION; |
|
5 | 5 | |
|
6 | 6 | use im_rc::ordmap::DiffItem; |
|
7 | use im_rc::ordmap::Entry; | |
|
7 | 8 | use im_rc::ordmap::OrdMap; |
|
8 | 9 | |
|
9 | 10 | use std::cmp::Ordering; |
@@ -510,11 +511,20 b' fn add_from_changes(' | |||
|
510 | 511 | // record this information as we will need it to take |
|
511 | 512 | // the right decision when merging conflicting copy |
|
512 | 513 | // information. See merge_copies_dict for details. |
|
513 | let ttpc = TimeStampedPathCopy { | |
|
514 | rev: current_rev, | |
|
515 | path: entry, | |
|
516 | }; | |
|
517 | copies.insert(dest.to_owned(), ttpc); | |
|
514 | match copies.entry(dest) { | |
|
515 | Entry::Vacant(slot) => { | |
|
516 | let ttpc = TimeStampedPathCopy { | |
|
517 | rev: current_rev, | |
|
518 | path: entry, | |
|
519 | }; | |
|
520 | slot.insert(ttpc); | |
|
521 | } | |
|
522 | Entry::Occupied(mut slot) => { | |
|
523 | let mut ttpc = slot.get_mut(); | |
|
524 | ttpc.rev = current_rev; | |
|
525 | ttpc.path = entry; | |
|
526 | } | |
|
527 | } | |
|
518 | 528 | } |
|
519 | 529 | Action::Removed(deleted_path) => { |
|
520 | 530 | // We must drop copy information for removed file. |
General Comments 0
You need to be logged in to leave comments.
Login now