Fix Repository.getAllRefs to skip HEAD if it points to an unborn branch
commitd82fce127e5913129b635eaca1e9c965939e3cd3
authorMarek Zawirski <marek.zawirski@gmail.com>
Mon, 21 Jul 2008 12:39:19 +0000 (21 14:39 +0200)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 30 Jul 2008 05:51:52 +0000 (29 22:51 -0700)
treec708562f841cae0680c74f4530f9ec96d730b915
parent55e9a699df786cee6fcbc593e29c97a628b20490
Fix Repository.getAllRefs to skip HEAD if it points to an unborn branch

If HEAD is a symbolic reference pointing to an unborn branch (branch
not yet created) we get a Ref object back for it supplying the name
of the branch, but its ObjectId is null as the branch file itself is
not present in the repository.  In such cases we should not include
the HEAD reference in the returned output.

Signed-off-by: Marek Zawirski <marek.zawirski@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/lib/RefDatabase.java