summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2023-09-20 22:18:01 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2023-09-25 16:15:35 +0200
commit2d16df1a07d72d32bb7981fc521ad8fe0b8791c6 (patch)
treed0603cf28a4e42916e587aaa83dec5d74c9951be
parent28d4b349024420ae56a54fb449f1791986bbff89 (diff)
downloadjgit-2d16df1a07d72d32bb7981fc521ad8fe0b8791c6.tar.gz
jgit-2d16df1a07d72d32bb7981fc521ad8fe0b8791c6.zip
[errorprone] TagCommand: Remove unused parameter of private method
See https://errorprone.info/bugpattern/UnusedVariable Change-Id: I7e8aae3494ce60dbeb474f6bead0817c36276e69
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java
index dd4ba10388..3edaf5e748 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java
@@ -33,7 +33,6 @@ import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.RefUpdate.Result;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.RepositoryState;
import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevWalk;
@@ -108,9 +107,7 @@ public class TagCommand extends GitCommand<Ref> {
public Ref call() throws GitAPIException, ConcurrentRefUpdateException,
InvalidTagNameException, NoHeadException {
checkCallable();
-
- RepositoryState state = repo.getRepositoryState();
- processOptions(state);
+ processOptions();
try (RevWalk revWalk = new RevWalk(repo)) {
// if no id is set, we should attempt to use HEAD
@@ -197,9 +194,6 @@ public class TagCommand extends GitCommand<Ref> {
* Sets default values for not explicitly specified options. Then validates
* that all required data has been provided.
*
- * @param state
- * the state of the repository we are working on
- *
* @throws InvalidTagNameException
* if the tag name is null or invalid
* @throws ServiceUnavailableException
@@ -208,7 +202,7 @@ public class TagCommand extends GitCommand<Ref> {
* if the tag should be signed but {@code gpg.format} is not
* {@link GpgFormat#OPENPGP}
*/
- private void processOptions(RepositoryState state)
+ private void processOptions()
throws InvalidTagNameException, ServiceUnavailableException,
UnsupportedSigningFormatException {
if (name == null