Skip to content
Browse files

Rename readPackHeader() to be onOpenPack()

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>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
  • Loading branch information...
1 parent 94b9333 commit bba2664a778bc3ae716b19d698ff0c6fc74d45fe @spearce spearce committed with robinrosenberg
Showing with 2 additions and 3 deletions.
  1. +2 −3 org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java
View
5 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];

0 comments on commit bba2664

Please sign in to comment.
Something went wrong with that request. Please try again.