diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/GitChangesetConverter.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/GitChangesetConverter.java index 7277ad55ab..27accf504f 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/GitChangesetConverter.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/GitChangesetConverter.java @@ -212,9 +212,10 @@ public class GitChangesetConverter implements Closeable Collection tagCollection = tags.get(commit.getId()); - if (tagCollection != null) + if (Util.isNotEmpty(tagCollection)) { - changeset.getTags().addAll(tagCollection); + // create a copy of the tag collection to reduce memory on caching + changeset.getTags().addAll(Lists.newArrayList(tagCollection)); } changeset.setBranches(branches);