File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -168,9 +168,9 @@ where
168
168
}
169
169
}
170
170
171
- fn try_find_cached_inner < ' a > (
172
- & self ,
173
- id : & git_hash:: oid ,
171
+ fn try_find_cached_inner < ' a , ' b > (
172
+ & ' b self ,
173
+ mut id : & ' b git_hash:: oid ,
174
174
buffer : & ' a mut Vec < u8 > ,
175
175
pack_cache : & mut impl DecodeEntry ,
176
176
snapshot : & mut load_index:: Snapshot ,
@@ -183,7 +183,16 @@ where
183
183
id : r. original_id . to_owned ( ) ,
184
184
} ) ;
185
185
}
186
+ } else if !self . ignore_replacements {
187
+ if let Ok ( pos) = self
188
+ . store
189
+ . replacements
190
+ . binary_search_by ( |( map_this, _) | map_this. as_ref ( ) . cmp ( id) )
191
+ {
192
+ id = self . store . replacements [ pos] . 1 . as_ref ( ) ;
193
+ }
186
194
}
195
+
187
196
' outer: loop {
188
197
{
189
198
let marker = snapshot. marker ;
Original file line number Diff line number Diff line change @@ -206,7 +206,6 @@ fn write() -> crate::Result {
206
206
}
207
207
208
208
#[ test]
209
- #[ ignore]
210
209
fn object_replacement ( ) {
211
210
let dir = git_testtools:: scripted_fixture_repo_read_only ( "make_replaced_history.sh" ) . unwrap ( ) ;
212
211
let handle = git_odb:: at ( dir. join ( ".git/objects" ) ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments