From: Kamil Musin Date: Tue, 8 Oct 2024 11:25:53 +0000 (+0200) Subject: Remove unnecessary argument handler in MergeBase.java X-Git-Tag: v7.1.0.202411121450-m3~1^2~7^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c99c8b9d00063fd177e4e895ac3e155cd2a0b437;p=jgit.git 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 --- 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 aacde2f430..a29c4d9f36 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