|
@@ -7311,7 +7311,8 @@ def lfs_fetch(
|
|
|
if pointer and pointer.is_valid_oid():
|
|
if pointer and pointer.is_valid_oid():
|
|
|
# Check if we already have it
|
|
# Check if we already have it
|
|
|
try:
|
|
try:
|
|
|
- store.open_object(pointer.oid)
|
|
|
|
|
|
|
+ with store.open_object(pointer.oid):
|
|
|
|
|
+ pass # Object exists, no need to fetch
|
|
|
except KeyError:
|
|
except KeyError:
|
|
|
pointers_to_fetch.append((pointer.oid, pointer.size))
|
|
pointers_to_fetch.append((pointer.oid, pointer.size))
|
|
|
|
|
|
|
@@ -7498,7 +7499,8 @@ def lfs_status(repo: Union[str, os.PathLike[str], Repo] = ".") -> dict[str, list
|
|
|
|
|
|
|
|
# Check if object exists locally
|
|
# Check if object exists locally
|
|
|
try:
|
|
try:
|
|
|
- store.open_object(pointer.oid)
|
|
|
|
|
|
|
+ with store.open_object(pointer.oid):
|
|
|
|
|
+ pass # Object exists locally
|
|
|
except KeyError:
|
|
except KeyError:
|
|
|
status["missing"].append(path_str)
|
|
status["missing"].append(path_str)
|
|
|
|
|
|