Skip to content

Commit

Permalink
[JENKINS-45771] Missed one boolean builder
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenc committed Jul 27, 2017
1 parent 1a7d53e commit f445161
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
Expand Up @@ -296,7 +296,11 @@ public FetchCommand tags(boolean tags) {
}

public FetchCommand prune() {
this.prune = true;
return prune(true);
}

public FetchCommand prune(boolean prune) {
this.prune = prune;
return this;
}

Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/jenkinsci/plugins/gitclient/FetchCommand.java
Expand Up @@ -25,9 +25,20 @@ public interface FetchCommand extends GitCommand {
* prune.
*
* @return a {@link org.jenkinsci.plugins.gitclient.FetchCommand} object.
* @deprecated favour {@link #prune(boolean)}
*/
@Deprecated
FetchCommand prune();

/**
* prune.
*
* @param prune {@code true} if the fetch should prune.
* @return a {@link org.jenkinsci.plugins.gitclient.FetchCommand} object.
* @since 2.5.0
*/
FetchCommand prune(boolean prune);

/**
* shallow.
*
Expand Down
Expand Up @@ -541,7 +541,12 @@ public org.jenkinsci.plugins.gitclient.FetchCommand from(URIish remote, List<Ref
}

public org.jenkinsci.plugins.gitclient.FetchCommand prune() {
shouldPrune = true;
return prune(true);
}

@Override
public org.jenkinsci.plugins.gitclient.FetchCommand prune(boolean prune) {
shouldPrune = prune;
return this;
}

Expand Down

0 comments on commit f445161

Please sign in to comment.