From c99c8b9d00063fd177e4e895ac3e155cd2a0b437 Mon Sep 17 00:00:00 2001 From: Kamil Musin Date: Tue, 8 Oct 2024 13:25:53 +0200 Subject: [PATCH] Remove unnecessary argument handler in MergeBase.java Currently the parsing of command line arguments always results in an error. ``` fatal: Argument "commit-ish" is required ``` This is caused by the fact that the first method (commit_0) is invoked twice. (As if the multiValued = true). I couldn't figure out, why that would be the case, as it's defaults to false and RevCommit handler doesn't seem to have a logic that would override that either. In any case, defining Arguments like this is unnecessary as it's sufficient to define a single ArrayList @Argument that will accumulate all commits. Change-Id: Ifd1278b3059f86618db05bfe264dd5c00879d82b --- org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java index aacde2f430f..a29c4d9f36e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java @@ -26,11 +26,6 @@ class MergeBase extends TextBuiltin { private boolean all; @Argument(index = 0, metaVar = "metaVar_commitish", required = true) - void commit_0(final RevCommit c) { - commits.add(c); - } - - @Argument(index = 1, metaVar = "metaVar_commitish", required = true) private List commits = new ArrayList<>(); @Override