Fix bugs with 'Included In' panel

The panel crashed if the project contained a tag pointing to a
blob or a tree.  This exists in the JGit, linux-2.6, and git.git
repositories, and is therefore common enough that we need to
handle it.  Skip over those references and keep searching for
included in names.

The panel's data factory didn't close the repository it opened,
leaking the reference count for it.  Fix that by closing it in
a try/finally block.

Change-Id: Ia1aee43442f3049403f41c7eb90c5f383a1fb824
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed