From: Shawn O. Pearce Date: Thu, 12 Feb 2009 02:36:56 GMT Subject: [JGIT PATCH 6/9] Rename readPackHeader() to be onOpenPack() Message-ID: <1234406219-19547-7-git-send-email-spearce@spearce.org> In-Reply-To: <1234406219-19547-6-git-send-email-spearce@spearce.org> Its just a better name of the function. Any logic we might try to perform to validate the pack file as we open it up to read should be here, and that logic may eventually include validation of the footer checksum against the index's footer data. Signed-off-by: Shawn O. Pearce --- .../src/org/spearce/jgit/lib/PackFile.java | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java index 7a16bf7..d34df03 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java @@ -89,7 +89,7 @@ public PackFile(final File idxFile, final File packFile) { pack = new WindowedFile(packFile) { @Override protected void onOpen() throws IOException { - readPackHeader(); + onOpenPack(); } }; } @@ -264,8 +264,7 @@ boolean supportsFastCopyRawData() throws IOException { return idx().hasCRC32Support(); } - - private void readPackHeader() throws IOException { + private void onOpenPack() throws IOException { final WindowCursor curs = new WindowCursor(); long position = 0; final byte[] sig = new byte[Constants.PACK_SIGNATURE.length]; -- 1.6.2.rc0.204.gf6b427