[JGIT PATCH 0/9] Misc. pack code cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a short batch of misc. cleanups related to pack handling.
I'm trying to work towards making it safer to run "git gc" while
JGit has a repository open.

Currently:

  - when a new pack is added we don't notice it;
  - when a previously listed pack is removed, we crash;
  - if a pack stays but its offsets change, we crash;
  - objects can go *poof* if they were loose and get packed;

This series doesn't fix any of these issues, but it cleans
up the code enough that I can start to consider this more.

The last patch is perhaps a bit more controversial.  It sets
core.packindex to 2 by default, which was done in C Git back
when 1.6.0 shipped.


Shawn O. Pearce (9):
  Remove the Repository parameter from PackFile's constructor
  Remove dead stats code from WindowCache
  Document why WindowFile's hash is *31
  Allow PackFile to lazily load its PackIndex on first demand
  Arrange pack files in recency order to improve quick hits
  Rename readPackHeader() to be onOpenPack()
  Validate the pack's footer checksum matches that in the index
  Remove yet another legacy StGit utility function
  Make pack.indexversion config option default to version 2

 .../src/org/spearce/jgit/pgm/IndexPack.java        |    4 +-
 .../tst/org/spearce/jgit/lib/PackWriterTest.java   |    2 +-
 .../tst/org/spearce/jgit/lib/T0004_PackReader.java |    2 +-
 .../org/spearce/jgit/transport/IndexPackTest.java  |    4 +-
 .../src/org/spearce/jgit/lib/CoreConfig.java       |    3 +-
 .../src/org/spearce/jgit/lib/PackFile.java         |   95 +++++++++++++------
 .../src/org/spearce/jgit/lib/PackIndex.java        |    3 +
 .../src/org/spearce/jgit/lib/PackIndexV1.java      |    3 +
 .../src/org/spearce/jgit/lib/PackIndexV2.java      |    3 +
 .../src/org/spearce/jgit/lib/PackWriter.java       |    1 +
 .../org/spearce/jgit/lib/PackedObjectLoader.java   |    4 +-
 .../src/org/spearce/jgit/lib/Repository.java       |   41 +++------
 .../src/org/spearce/jgit/lib/WindowCache.java      |   31 +------
 .../src/org/spearce/jgit/lib/WindowedFile.java     |    4 +
 14 files changed, 106 insertions(+), 94 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux