Skip to content

Commit 0878344

Browse files
committed
adjust debug assertion to count blobs and executables (#1224)
Fixes #1224. The intention was to check for blobs, which can also be executable, even though the expectation ended up only allowing blobs, not executables. This is now fixed. Fortunately this was only an issue in debug builds.
1 parent 62e1072 commit 0878344

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gix-diff/src/rewrites/tracker.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,8 @@ fn find_match<'a, T: Change>(
468468
} else {
469469
let mut has_new = false;
470470
let percentage = percentage.expect("it's set to something below 1.0 and we assured this");
471-
debug_assert_eq!(
472-
item.change.entry_mode().kind(),
473-
EntryKind::Blob,
471+
debug_assert!(
472+
item_mode.is_blob(),
474473
"symlinks are matched exactly, and trees aren't used here"
475474
);
476475

0 commit comments

Comments
 (0)