]> source.dussan.org Git - gitblit.git/commitdiff
Remove elaborate HEAD determination
authorJames Moger <james.moger@gitblit.com>
Tue, 26 Nov 2013 21:05:06 +0000 (16:05 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 26 Nov 2013 21:05:06 +0000 (16:05 -0500)
Change-Id: I0da34a1da0dc3dcb07a98629c2284184402cb23a

src/main/java/com/gitblit/utils/JGitUtils.java

index 5584fb5c651676e406f1d05278975182df85523e..47799aabcf6dced66691e6e7925dc5f2d428904a 100644 (file)
@@ -1470,23 +1470,6 @@ public class JGitUtils {
                String target = null;\r
                try {\r
                        target = repository.getFullBranch();\r
-                       if (!target.startsWith(Constants.R_HEADS)) {\r
-                               // refers to an actual commit, probably a tag\r
-                               // find latest tag that matches the commit, if any\r
-                               List<RefModel> tagModels = getTags(repository, true, -1);\r
-                               if (tagModels.size() > 0) {\r
-                                       RefModel tag = null;\r
-                                       Date lastDate = new Date(0);\r
-                                       for (RefModel tagModel : tagModels) {\r
-                                               if (tagModel.getReferencedObjectId().getName().equals(target) &&\r
-                                                               tagModel.getDate().after(lastDate)) {\r
-                                                       tag = tagModel;\r
-                                                       lastDate = tag.getDate();\r
-                                               }\r
-                                       }\r
-                                       target = tag.getName();\r
-                               }\r
-                       }\r
                } catch (Throwable t) {\r
                        error(t, repository, "{0} failed to get symbolic HEAD target");\r
                }\r