Skip to content

Commit f712aeb

Browse files
committed
adapt to changes in gix-object
1 parent 5bb55de commit f712aeb

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

gix-status/src/index_as_worktree/traits.rs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,14 @@ impl CompareBlobs for HashEq {
148148
stream.read_to_end(buf)?;
149149
gix_object::compute_hash(entry.id.kind(), gix_object::Kind::Blob, buf)
150150
}
151-
Some(len) => {
152-
let header = gix_object::encode::loose_header(gix_object::Kind::Blob, len);
153-
let mut hasher = gix_features::hash::hasher(entry.id.kind());
154-
hasher.update(&header);
155-
gix_features::hash::bytes_with_hasher(
156-
&mut stream,
157-
len,
158-
hasher,
159-
&mut gix_features::progress::Discard,
160-
&AtomicBool::default(),
161-
)?
162-
}
151+
Some(len) => gix_object::compute_stream_hash(
152+
entry.id.kind(),
153+
gix_object::Kind::Blob,
154+
&mut stream,
155+
len,
156+
&mut gix_features::progress::Discard,
157+
&AtomicBool::default(),
158+
)?,
163159
};
164160
Ok((entry.id != file_hash).then_some(file_hash))
165161
}

0 commit comments

Comments
 (0)