Fix missing packed-refs entries during ref lookup/enumeration
commit60000a50c87bf7f79e52b123170d8bc50d72b4cb
authorShawn O. Pearce <spearce@spearce.org>
Sun, 27 Jul 2008 04:31:13 +0000 (26 21:31 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 30 Jul 2008 05:52:05 +0000 (29 22:52 -0700)
tree2f725c655c49c5138272f953a6b05f33a61e247d
parentd82fce127e5913129b635eaca1e9c965939e3cd3
Fix missing packed-refs entries during ref lookup/enumeration

Some codepaths in RefDatabase allowed the caller to lookup a ref
without making sure the packed-refs file was loaded into memory.
This caused refs which were only packed to appear to not exist,
which meant fetch would still try to fetch something we already
have had for quite some time.

This resolves the issue I was seeing where `jgit fetch` was always
downloading the stable branch of egit.git, even though it has not
changed in many weeks.

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