diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2020-01-29 19:12:06 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2020-02-11 00:03:33 +0100 |
commit | 79266a1fe5b6893ee66177489f7f59f08cb2b294 (patch) | |
tree | 02a89b2330ba67531467222fc9bd374564151dcc | |
parent | 936a031ca341c4ffb16939350f81adadf5c2d7dd (diff) | |
download | jgit-79266a1fe5b6893ee66177489f7f59f08cb2b294.tar.gz jgit-79266a1fe5b6893ee66177489f7f59f08cb2b294.zip |
reftable: don't check deadline on the first try
This helps debug stepping.
Change-Id: I020dafab4ffac75e6df0dbcde0ed4805c7867f72
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java index 4536e04637..cc52bfb719 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java @@ -262,8 +262,13 @@ public class FileReftableStack implements AutoCloseable { long max = 1000; long delay = 0; boolean success = false; - while (System.currentTimeMillis() < deadline) { + + // Don't check deadline for the first 3 retries, so we can step with a + // debugger without worrying about deadlines. + int tries = 0; + while (tries < 3 || System.currentTimeMillis() < deadline) { List<String> names = readTableNames(); + tries++; try { reloadOnce(names); success = true; |