diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2013-06-22 02:19:08 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2013-09-09 22:54:52 +0200 |
commit | 01e793a3ffa3d5512826f85e108df82ca9a59391 (patch) | |
tree | 4cd35ba378593dd8e3d11c3bce62d623418d3920 /org.eclipse.jgit.pgm/src | |
parent | c2a9f9e742f7e6633af130823c154a485e6071b2 (diff) | |
download | jgit-01e793a3ffa3d5512826f85e108df82ca9a59391.tar.gz jgit-01e793a3ffa3d5512826f85e108df82ca9a59391.zip |
Add missing usage texts for JGit commandline commands
Also update help text for the merge command now supporting recursive
strategy as the default merge strategy.
Change-Id: I07886fe875c407e2244f562c003bb9d04f398026
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
21 files changed, 43 insertions, 11 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java index 0eb220407a..0ec5c1e148 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java @@ -52,19 +52,19 @@ import org.kohsuke.args4j.Option; @Command(common = true, usage = "usage_getAndSetOptions") class Config extends TextBuiltin { - @Option(name = "--system") + @Option(name = "--system", usage = "usage_configSystem") private boolean system; - @Option(name = "--global") + @Option(name = "--global", usage = "usage_configGlobal") private boolean global; - @Option(name = "--local") + @Option(name = "--local", usage = "usage_configLocal") private boolean local; - @Option(name = "--list", aliases = { "-l" }) + @Option(name = "--list", aliases = { "-l" }, usage = "usage_configList") private boolean list; - @Option(name = "--file", aliases = { "-f" }) + @Option(name = "--file", aliases = { "-f" }, metaVar = "metaVar_file", usage = "usage_configFile") private File configFile; @Override diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java index 018bad0694..d89053c4cb 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java @@ -56,6 +56,7 @@ import org.eclipse.jgit.treewalk.TreeWalk; import org.eclipse.jgit.treewalk.filter.AndTreeFilter; import org.eclipse.jgit.treewalk.filter.TreeFilter; +@Command(usage = "usage_ShowDiffTree") class DiffTree extends TextBuiltin { @Option(name = "--recursive", usage = "usage_recurseIntoSubtrees", aliases = { "-r" }) private boolean recursive; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java index 5384bbb01b..58813bcb00 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java @@ -47,6 +47,7 @@ import org.eclipse.jgit.internal.storage.file.FileRepository; import org.eclipse.jgit.internal.storage.file.GC; import org.eclipse.jgit.lib.TextProgressMonitor; +@Command(common = true, usage = "usage_Gc") class Gc extends TextBuiltin { @Override protected void run() throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java index 8b35fd1751..f07c3ca8b5 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java @@ -65,6 +65,7 @@ import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevSort; import org.eclipse.jgit.revwalk.RevWalk; +@Command(usage = "usage_Glog") class Glog extends RevWalkTextBuiltin { final JFrame frame; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java index 731ef01a35..9fc5882426 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java @@ -52,6 +52,7 @@ import org.eclipse.jgit.lib.TextProgressMonitor; import org.eclipse.jgit.transport.PackParser; import org.kohsuke.args4j.Option; +@Command(usage = "usage_IndexPack") class IndexPack extends TextBuiltin { @Option(name = "--fix-thin", usage = "usage_fixAThinPackToBeComplete") private boolean fixThin; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java index 282c79d162..1842b725e9 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java @@ -54,6 +54,7 @@ import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.transport.FetchConnection; import org.eclipse.jgit.transport.Transport; +@Command(common = true, usage = "usage_LsRemote") class LsRemote extends TextBuiltin { @Option(name = "--timeout", metaVar = "metaVar_service", usage = "usage_abortConnectionIfNoActivity") int timeout = -1; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java index 4fb560b198..e444d21dd9 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java @@ -57,6 +57,7 @@ import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.Option; import org.kohsuke.args4j.spi.StopOptionHandler; +@Command(common = true, usage = "usage_LsTree") class LsTree extends TextBuiltin { @Option(name = "--recursive", usage = "usage_recurseIntoSubtrees", aliases = { "-r" }) private boolean recursive; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java index 67b7cc8752..b3ff527ebc 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java @@ -78,18 +78,22 @@ class Merge extends TextBuiltin { private MergeStrategy mergeStrategy = MergeStrategy.RECURSIVE; - @Argument(required = true) + @Argument(required = true, metaVar = "metaVar_ref", usage = "usage_mergeRef") private String ref; - @Option(name = "--ff") private FastForwardMode ff = FastForwardMode.FF; - @Option(name = "--no-ff") + @Option(name = "--ff", usage = "usage_mergeFf") + void ff(@SuppressWarnings("unused") final boolean ignored) { + ff = FastForwardMode.FF; + } + + @Option(name = "--no-ff", usage = "usage_mergeNoFf") void noff(@SuppressWarnings("unused") final boolean ignored) { ff = FastForwardMode.NO_FF; } - @Option(name = "--ff-only") + @Option(name = "--ff-only", usage = "usage_mergeFfOnly") void ffonly(@SuppressWarnings("unused") final boolean ignored) { ff = FastForwardMode.FF_ONLY; } 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 34aa9b2fed..29cbb53a98 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 @@ -52,6 +52,7 @@ import org.kohsuke.args4j.Option; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.filter.RevFilter; +@Command(usage = "usage_MergeBase") class MergeBase extends TextBuiltin { @Option(name = "--all", usage = "usage_displayAllPossibleMergeBases") private boolean all; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java index bab502b791..4420abec16 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java @@ -49,6 +49,7 @@ import org.eclipse.jgit.revwalk.RevFlag; import org.eclipse.jgit.revwalk.RevObject; import org.eclipse.jgit.revwalk.RevTree; +@Command(usage = "usage_RevList") class RevList extends RevWalkTextBuiltin { @Override protected void show(final RevCommit c) throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java index b564107b9e..674c202273 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java @@ -53,11 +53,12 @@ import org.kohsuke.args4j.Option; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Ref; +@Command(usage = "usage_RevParse") class RevParse extends TextBuiltin { - @Option(name = "--all") + @Option(name = "--all", usage = "usage_RevParseAll") boolean all = false; - @Argument(index = 0, metaVar = "commit-ish") + @Argument(index = 0, metaVar = "metaVar_commitish") private final List<ObjectId> commits = new ArrayList<ObjectId>(); @Override diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java index 2c621ac897..203c92d4a5 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java @@ -54,6 +54,7 @@ import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.RefComparator; import org.eclipse.jgit.util.RefMap; +@Command(usage = "usage_ShowRef") class ShowRef extends TextBuiltin { @Override protected void run() throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java index 3efe8845f6..91b5917155 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java @@ -70,6 +70,7 @@ import org.eclipse.jgit.lib.ObjectReader; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryBuilder; import org.eclipse.jgit.lib.RepositoryCache; +import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; import org.eclipse.jgit.pgm.internal.CLIText; import org.eclipse.jgit.revwalk.RevCommit; @@ -79,6 +80,7 @@ import org.eclipse.jgit.treewalk.filter.TreeFilter; import org.eclipse.jgit.util.FS; import org.kohsuke.args4j.Option; +@Command(usage = "usage_DiffAlgorithms") class DiffAlgorithms extends TextBuiltin { final Algorithm myers = new Algorithm() { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java index 5e6195e953..d3a0a3e14e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java @@ -51,9 +51,11 @@ import java.text.MessageFormat; import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCacheTree; +import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; import org.eclipse.jgit.pgm.internal.CLIText; +@Command(usage = "usage_MakeCacheTree") class MakeCacheTree extends TextBuiltin { @Override protected void run() throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java index 7cef64b037..07bfc4b5fe 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java @@ -48,9 +48,11 @@ import static java.lang.Long.valueOf; import java.text.MessageFormat; +import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; import org.eclipse.jgit.pgm.internal.CLIText; +@Command(usage = "usage_ReadDirCache") class ReadDirCache extends TextBuiltin { @Override protected void run() throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java index f25956f802..df59bbe686 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java @@ -70,6 +70,7 @@ import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.RefUpdate; import org.eclipse.jgit.lib.RefWriter; import org.eclipse.jgit.lib.TextProgressMonitor; +import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; import org.eclipse.jgit.pgm.internal.CLIText; import org.eclipse.jgit.revwalk.RevWalk; @@ -94,6 +95,7 @@ import org.kohsuke.args4j.Option; * deleted from the current repository. * <p> */ +@Command(usage = "usage_RebuildCommitGraph") class RebuildCommitGraph extends TextBuiltin { private static final String REALLY = "--destroy-this-repository"; //$NON-NLS-1$ diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java index 7b0c287575..e287425d7b 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java @@ -51,9 +51,11 @@ import java.text.MessageFormat; import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCacheTree; +import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; import org.eclipse.jgit.pgm.internal.CLIText; +@Command(usage = "usage_ShowCacheTree") class ShowCacheTree extends TextBuiltin { @Override protected void run() throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java index e69738c09f..71af3d10ab 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java @@ -54,8 +54,10 @@ import java.util.Date; import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCacheEntry; import org.eclipse.jgit.lib.FileMode; +import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; +@Command(usage = "usage_ShowDirCache") class ShowDirCache extends TextBuiltin { @Override protected void run() throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java index 26ad931896..7b5cdbf8f7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java @@ -60,12 +60,14 @@ import org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation; import org.eclipse.jgit.lib.NullProgressMonitor; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectReader; +import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; import org.eclipse.jgit.revwalk.RevObject; import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.util.TemporaryBuffer; import org.kohsuke.args4j.Argument; +@Command(usage = "usage_ShowPackDelta") class ShowPackDelta extends TextBuiltin { @Argument(index = 0) private ObjectId objectId; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java index e43c9a6af4..4205140bb9 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java @@ -64,6 +64,7 @@ import org.eclipse.jgit.lib.ObjectReader; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryBuilder; import org.eclipse.jgit.lib.RepositoryCache; +import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; import org.eclipse.jgit.pgm.internal.CLIText; import org.eclipse.jgit.revwalk.RevWalk; @@ -90,6 +91,7 @@ import org.kohsuke.args4j.Option; * type {@link Fold} and implement the logic. The test suite will automatically * pick up the new function through reflection. */ +@Command(usage = "usage_TextHashFunctions") class TextHashFunctions extends TextBuiltin { /** Standard SHA-1 on the line, using the first 4 bytes as the hash code. */ diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java index 4adb27671a..42428c7740 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java @@ -45,9 +45,11 @@ package org.eclipse.jgit.pgm.debug; import org.eclipse.jgit.dircache.DirCache; +import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; import org.eclipse.jgit.pgm.internal.CLIText; +@Command(usage = "usage_WriteDirCache") class WriteDirCache extends TextBuiltin { @Override protected void run() throws Exception { |