diff options
author | James Moger <james.moger@gitblit.com> | 2013-11-26 16:05:06 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-11-26 16:05:06 -0500 |
commit | 3d87db0d203b855ea819e4dfdd6bd1a328182719 (patch) | |
tree | 80f46501f7106655a4c3de3c6e24e469bc628f81 | |
parent | 4fcac9d2cbdafb51e3ee9ca3b3da64fd86103174 (diff) | |
download | gitblit-3d87db0d203b855ea819e4dfdd6bd1a328182719.tar.gz gitblit-3d87db0d203b855ea819e4dfdd6bd1a328182719.zip |
Remove elaborate HEAD determination
Change-Id: I0da34a1da0dc3dcb07a98629c2284184402cb23a
-rw-r--r-- | src/main/java/com/gitblit/utils/JGitUtils.java | 17 |
1 files changed, 0 insertions, 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<RefModel> 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");
}
|