Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.ListTagCommand.call()


        throw die(MessageFormat.format(CLIText.get().tagAlreadyExists,
            tagName));
      }
    } else {
      ListTagCommand command = git.tagList();
      List<Ref> list = command.call();
      for (Ref ref : list) {
        outw.println(Repository.shortenRefName(ref.getName()));
      }
    }
  }
View Full Code Here


    @Test
    public void shouldGetTags() throws Exception {
        // print = true;
        ListTagCommand command = git.tagList();
        for (Ref ref : command.call()) {
            String fullName = ref.getName();
            String name = fullName.replaceFirst("refs/tags/", "");
            print(fullName + " \t--> " + name);
        }
    }
View Full Code Here

    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, "");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.