summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-04-10 14:12:33 +0200
committerJunio C Hamano <gitster@pobox.com>2026-05-15 04:50:44 +0900
commit87de1b31e04fc5ce4f47c2a8dbfdc90b25e5bdbe (patch)
tree153ee6a03aeca6ae7920c34c50410d0c2475f282 /t/t4013/diff.diff_initial..side
parent8caa2e090f1b83df7c0fc82ed7f7c8772f3ec5f4 (diff)
odb: fix unnecessary call to `find_cached_object()`
The function `odb_pretend_object()` writes an object into the in-memory object database source. The effect of this is that the object will now become readable, but it won't ever be persisted to disk. Before storing the object, we first verify whether the object already exists. This is done by calling `odb_has_object()` to check all sources, followed by `find_cached_object()` to check whether we have already stored the object in our in-memory source. This is unnecessary though, as `odb_has_object()` already checks the in-memory source transitively via: - `odb_has_object()` - `odb_read_object_info_extended()` - `do_oid_object_info_extended()` - `find_cached_object()` Drop the explicit call to `find_cached_object()`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions