git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: git@vger.kernel.org
Subject: [JGIT PATCH 6/9] Rename readPackHeader() to be onOpenPack()
Date: Wed, 11 Feb 2009 18:36:56 -0800	[thread overview]
Message-ID: <1234406219-19547-7-git-send-email-spearce@spearce.org> (raw)
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 <spearce@spearce.org>
---
 .../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

  reply	other threads:[~2009-02-12  2:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12  2:36 [JGIT PATCH 0/9] Misc. pack code cleanups Shawn O. Pearce
2009-02-12  2:36 ` [JGIT PATCH 1/9] Remove the Repository parameter from PackFile's constructor Shawn O. Pearce
2009-02-12  2:36   ` [JGIT PATCH 2/9] Remove dead stats code from WindowCache Shawn O. Pearce
2009-02-12  2:36     ` [JGIT PATCH 3/9] Document why WindowFile's hash is *31 Shawn O. Pearce
2009-02-12  2:36       ` [JGIT PATCH 4/9] Allow PackFile to lazily load its PackIndex on first demand Shawn O. Pearce
2009-02-12  2:36         ` [JGIT PATCH 5/9] Arrange pack files in recency order to improve quick hits Shawn O. Pearce
2009-02-12  2:36           ` Shawn O. Pearce [this message]
2009-02-12  2:36             ` [JGIT PATCH 7/9] Validate the pack's footer checksum matches that in the index Shawn O. Pearce
2009-02-12  2:36               ` [JGIT PATCH 8/9] Remove yet another legacy StGit utility function Shawn O. Pearce
2009-02-12  2:36                 ` [JGIT PATCH 9/9] Make pack.indexversion config option default to version 2 Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1234406219-19547-7-git-send-email-spearce@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg@dewire.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).