Example usage for org.eclipse.jgit.transport TagOpt AUTO_FOLLOW

List of usage examples for org.eclipse.jgit.transport TagOpt AUTO_FOLLOW

Introduction

In this page you can find the example usage for org.eclipse.jgit.transport TagOpt AUTO_FOLLOW.

Prototype

TagOpt AUTO_FOLLOW

To view the source code for org.eclipse.jgit.transport TagOpt AUTO_FOLLOW.

Click Source Link

Document

Automatically follow tags if we fetch the thing they point at.

Usage

From source file:org.ajoberstar.gradle.git.tasks.GitFetch.java

License:Apache License

/**
 * Attempts to get a valid {@link TagOpt} out of the user
 * configuration//from w  w  w  . j av  a 2 s. co m
 * 
 * @return the TagOpt corresponding to the user input 
 */
private TagOpt getTagOpt() {
    String tagConfig = ObjectUtil.unpackString(getFetchTags());
    if (tagConfig == null) {
        return TagOpt.AUTO_FOLLOW;
    } else if (tagConfig.equalsIgnoreCase("auto")) {
        return TagOpt.AUTO_FOLLOW;
    } else if (tagConfig.equalsIgnoreCase("yes")) {
        return TagOpt.FETCH_TAGS;
    } else if (tagConfig.equalsIgnoreCase("no")) {
        return TagOpt.NO_TAGS;
    } else {
        throw new GradleException(
                "No valid tag option could be " + "identified from the specified input: " + tagConfig);
    }
}

From source file:org.eclipse.egit.ui.internal.components.RefSpecPage.java

License:Open Source License

/**
 * @return selected tag fetching strategy. This result is relevant only for
 *         fetch page./*from  w ww . j av  a  2 s .  c om*/
 */
public TagOpt getTagOpt() {
    if (tagsAutoFollowButton.getSelection())
        return TagOpt.AUTO_FOLLOW;
    if (tagsFetchTagsButton.getSelection())
        return TagOpt.FETCH_TAGS;
    return TagOpt.NO_TAGS;
}