Skip to content

Commit 7303556

Browse files
Move :linear to cached filters (#752)
The :linear filter was wrongly added to the non cached filters Change-Id: linear-cache
1 parent d24948d commit 7303556

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/filter/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,16 @@ fn apply_to_commit2(
286286
Op::Squash => {
287287
return Some(history::rewrite_commit(repo, commit, &[], &commit.tree()?)).transpose()
288288
}
289+
_ => {
290+
if let Some(oid) = transaction.get(filter, commit.id()) {
291+
return Ok(Some(oid));
292+
}
293+
}
294+
};
295+
296+
rs_tracing::trace_scoped!("apply_to_commit", "spec": spec(filter), "commit": commit.id().to_string());
297+
298+
let filtered_tree = match &to_op(filter) {
289299
Op::Linear => {
290300
let p: Vec<_> = commit.parents().collect();
291301
if p.len() == 0 {
@@ -304,16 +314,6 @@ fn apply_to_commit2(
304314
))
305315
.transpose();
306316
}
307-
_ => {
308-
if let Some(oid) = transaction.get(filter, commit.id()) {
309-
return Ok(Some(oid));
310-
}
311-
}
312-
};
313-
314-
rs_tracing::trace_scoped!("apply_to_commit", "spec": spec(filter), "commit": commit.id().to_string());
315-
316-
let filtered_tree = match &to_op(filter) {
317317
Op::Compose(filters) => {
318318
let filtered = filters
319319
.iter()

0 commit comments

Comments
 (0)