Make PackIndex public and expose PackIndex.hasObject
commit270890b687c28cc314914e7f48dfc47456b23266
authorShawn O. Pearce <spearce@spearce.org>
Wed, 7 May 2008 02:42:17 +0000 (6 22:42 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 11 May 2008 05:16:36 +0000 (11 01:16 -0400)
tree38c26d65c0a6eff0de8e2f18e312aaa075bc5da0
parent10c970f0e7c2bd0e95dec2c3ad2e64187b5352bf
Make PackIndex public and expose PackIndex.hasObject

Some application code, such as "dumb" commit walkers that perform
fetching over non-Git aware protocols like HTTP or FTP require an
efficient means to read a pack's .idx file and then test if there
is an occurrence of an object stored within that pack.  The test
frequently gets used by application code to determine if it needs
to download a pack file.

Indexes are generally smaller and thus cheaper to transport over
the dumb protocol, so they are the better method to determine an
object existence test.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java
org.spearce.jgit/src/org/spearce/jgit/lib/PackIndex.java