aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2025-01-27 23:23:49 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2025-01-29 14:02:28 +0100
commit12b89ab6dbc897123089492741270a762911a8f3 (patch)
treef871cb201aef866f5db6848fd4d22dc19f61da58
parent0a3d13508aa9ef4dc6f5ad97014f2f0ea5568195 (diff)
downloadjgit-12b89ab6dbc897123089492741270a762911a8f3.tar.gz
jgit-12b89ab6dbc897123089492741270a762911a8f3.zip
LooseObjects: compute loose object path before retry loop
It's unnecessary to recompute this for retries. Change-Id: I383ecfa25d795ba177dd5ce14d12b318e38daf9b
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java
index ce565308be..74ef6e139c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java
@@ -163,8 +163,8 @@ class LooseObjects {
}
ObjectLoader open(WindowCursor curs, AnyObjectId id) throws IOException {
+ File path = fileFor(id);
for (int retries = 0; retries < MAX_STALE_READ_RETRIES; retries++) {
- File path = fileFor(id);
if (trustFolderStat && !path.exists()) {
break;
}