protected void addTagsAsChildren( Git git,
CallSpecification spec,
DocumentWriter writer ) throws GitAPIException {
// Generate the child references to the branches, which will be sorted by name (by the command).
ListTagCommand command = git.tagList();
List<Ref> tags = command.call();
// Reverse the sort of the branch names, since they might be version numbers ...
Collections.sort(tags, REVERSE_REF_COMPARATOR);
for (Ref ref : tags) {
String fullName = ref.getName();
String name = fullName.replaceFirst(TAG_PREFIX, "");