From 3d87db0d203b855ea819e4dfdd6bd1a328182719 Mon Sep 17 00:00:00 2001 From: James Moger Date: Tue, 26 Nov 2013 16:05:06 -0500 Subject: [PATCH] Remove elaborate HEAD determination Change-Id: I0da34a1da0dc3dcb07a98629c2284184402cb23a --- src/main/java/com/gitblit/utils/JGitUtils.java | 17 ----------------- 1 file changed, 17 deletions(-) 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"); } -- 2.39.5