summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst-rsrc/org
diff options
context:
space:
mode:
authorAnna Papitto <annapapitto@google.com>2023-07-14 12:19:27 -0700
committerAnna Papitto <annapapitto@google.com>2023-07-18 15:19:26 -0700
commit2eba4e5b41c299d82e5aa0b974a1f039997ecf6e (patch)
tree7bea9924a36b198a7fd836984ad568965a6d4793 /org.eclipse.jgit.test/tst-rsrc/org
parent8123dcd6993457622fc5df08c58c776286cc427a (diff)
downloadjgit-2eba4e5b41c299d82e5aa0b974a1f039997ecf6e.tar.gz
jgit-2eba4e5b41c299d82e5aa0b974a1f039997ecf6e.zip
PackReverseIndex: open file if present otherwise compute
The existing #read and #computeFromIndex static builder methods require the caller to choose whether to supply an input stream of a reverse index file or a forward index to compute the reverse index from, which is slower. Allow a caller to provide a file path where the pack's reverse index might be and the pack's forward index index and simply get some reverse index instance back. Prefer opening and parsing the file if it is present, to save computation time. Otherwise, fall back onto computing the reverse index from the pack's forward index. Change-Id: I09bdd4b813ad62c86add586417b2ab86e9331aec Signed-off-by: Anna Papitto <annapapitto@google.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst-rsrc/org')
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.corrupt.revbin0 -> 76 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.revbin0 -> 76 bytes
2 files changed, 0 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.corrupt.rev b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.corrupt.rev
new file mode 100644
index 0000000000..74283a2f9a
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.corrupt.rev
Binary files differ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.rev b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.rev
new file mode 100644
index 0000000000..6ac7d65f67
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.rev
Binary files differ