Improve precision of detached head decoration
commitfff7705ca6387920b1ecfb493fc367be6c52f428
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 2 Jan 2013 15:06:02 +0000 (2 16:06 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 3 Jan 2013 00:24:45 +0000 (3 01:24 +0100)
tree948d8ea34380468fc7b82433b4f602b282b3aad3
parentae0f356ef074fc15291fbd556396e675a8c834e5
Improve precision of detached head decoration

For decorations in EGit we want to display the name used for checking
out a tag. If a tag was checked out HEAD points to a commitId directly,
but the reflog contains the tag name used. Scan the reflog and use the
latest checkout whose refname resolves to the same commit as HEAD.

If not try, as before, to find any matching ref and use the one last
updated.

Bug: 385392
Change-Id: Icb10545a1e503a98fd9ea98fbb6770c37a9e4bfe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.egit.core/src/org/eclipse/egit/core/RepositoryUtil.java