assert re insert
@@ -10,6 +10,9 @@ pub struct ViewMaps {
impl ViewMaps {
pub fn set(&mut self, viewstr: &str, from: git2::Oid, to: git2::Oid) {
+ if self.has(&viewstr, from) {
+ assert!(self.get(&viewstr, from) == to);
+ }
self.maps
.entry(viewstr.to_string())
.or_insert_with(ViewMap::new)
