Skip to content

Commit

Permalink
Merge pull request #999 from imageworks/spfs-diff-size-differences
Browse files Browse the repository at this point in the history
Make spfs diff only check sizes on blobs
  • Loading branch information
jrray authored Mar 6, 2024
2 parents b588347 + 3291948 commit b9b87a1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/spfs/src/tracking/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,14 @@ impl<T, T2> PartialEq<Entry<T2>> for Entry<T> {
entries,
user_data: _,
} = other;
if self.kind != *kind || self.mode != *mode || self.size != *size || self.object != *object
{
if self.kind != *kind || self.mode != *mode || self.object != *object {
return false;
}
// Only compare size for blobs. The size captured for directories can
// vary based on the filesystem in use or if fuse is in use, and
// a rendered manifest may not have the expected size even if it is
// unmodified.
if self.kind.is_blob() && self.size != *size {
return false;
}
if self.entries.len() != entries.len() {
Expand Down

0 comments on commit b9b87a1

Please sign in to comment.