Don't load an object if we just need its existance.
commitab3f22a16222501d7f834f7acff98b0494952695
authorShawn O. Pearce <spearce@spearce.org>
Sun, 3 Dec 2006 04:04:24 +0000 (2 23:04 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 3 Dec 2006 04:04:24 +0000 (2 23:04 -0500)
treee6029c9c9b0a5411e397cd245e1bb935735ad949
parentcd4e286c1570e00f8dd5f9c305ae337b6fcfb8ee
Don't load an object if we just need its existance.

If we are only looking to answer the question "does this object exist
in this pack" we really only need to look at the index and can avoid
parsing the object out of the pack, as well as avoid the cost of
allocating the ObjectLoader for it, especially when it is just going
to be thrown away.

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/Repository.java