From: James Moger Date: Tue, 26 Nov 2013 21:05:06 +0000 (-0500) Subject: Remove elaborate HEAD determination X-Git-Tag: v1.4.0~195 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3d87db0d203b855ea819e4dfdd6bd1a328182719;p=gitblit.git Remove elaborate HEAD determination Change-Id: I0da34a1da0dc3dcb07a98629c2284184402cb23a --- diff --git a/src/main/java/com/gitblit/utils/JGitUtils.java b/src/main/java/com/gitblit/utils/JGitUtils.java index 5584fb5c..47799aab 100644 --- a/src/main/java/com/gitblit/utils/JGitUtils.java +++ b/src/main/java/com/gitblit/utils/JGitUtils.java @@ -1470,23 +1470,6 @@ public class JGitUtils { String target = null; try { target = repository.getFullBranch(); - if (!target.startsWith(Constants.R_HEADS)) { - // refers to an actual commit, probably a tag - // find latest tag that matches the commit, if any - List tagModels = getTags(repository, true, -1); - if (tagModels.size() > 0) { - RefModel tag = null; - Date lastDate = new Date(0); - for (RefModel tagModel : tagModels) { - if (tagModel.getReferencedObjectId().getName().equals(target) && - tagModel.getDate().after(lastDate)) { - tag = tagModel; - lastDate = tag.getDate(); - } - } - target = tag.getName(); - } - } } catch (Throwable t) { error(t, repository, "{0} failed to get symbolic HEAD target"); }