Browse Source

Merge "Add missing usage texts for JGit commandline commands"

tags/v3.1.0.201309270735-rc1
Matthias Sohn 10 years ago
parent
commit
e10dd22749
22 changed files with 73 additions and 12 deletions
  1. 30
    1
      org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
  2. 5
    5
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java
  3. 1
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
  4. 1
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java
  5. 1
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
  6. 1
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java
  7. 1
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
  8. 1
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
  9. 8
    4
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
  10. 1
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
  11. 1
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java
  12. 3
    2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
  13. 1
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
  14. 2
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
  15. 2
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java
  16. 2
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java
  17. 2
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
  18. 2
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java
  19. 2
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java
  20. 2
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java
  21. 2
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
  22. 2
    0
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java

+ 30
- 1
org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties View File

@@ -186,16 +186,36 @@ usage_CommitPaths=see --only
usage_CreateABareRepository=Create a bare repository
usage_CreateATag=Create a tag
usage_CreateAnEmptyGitRepository=Create an empty git repository
usage_DiffAlgorithms=Test performance of jgit's diff algorithms
usage_DisplayTheVersionOfJgit=Display the version of jgit
usage_Gc=Cleanup unnecessary files and optimize the local repository
usage_Glog=View commit history as a graph
usage_IndexPack=Build pack index file for an existing packed archive
usage_LsRemote=List references in a remote repository
usage_LsTree=List the contents of a tree object
usage_MakeCacheTree=Show the current cache tree structure
usage_MergeBase=Find as good common ancestors as possible for a merge
usage_MergesTwoDevelopmentHistories=Merges two development histories
usage_ReadDirCache= Read the DirCache 100 times
usage_RebuildCommitGraph=Recreate a repository from another one's commit graph
usage_RepositoryToReadFrom=Repository to read from
usage_RepositoryToReceiveInto=Repository to receive into
usage_RevList=List commit objects in reverse chronological order
usage_RevParse=Pick out and massage parameters
usage_RevParseAll=Show all refs found in refs/
usage_ServerSideBackendForJgitFetch=Server side backend for 'jgit fetch'
usage_ServerSideBackendForJgitPush=Server side backend for 'jgit push'
usage_ShowCacheTree=Show cache tree
usage_ShowDiffs=Show diffs
usage_ShowDiffTree=Compare the content and mode of blobs found via two tree objects
usage_ShowDirCache= Show the DirCache
usage_ShowPackDelta=Show pack delta for given object
usage_ShowRef=List references in a local repository
usage_Status=Show the working tree status
usage_StopTrackingAFile=Stop tracking a file
usage_TextHashFunctions=Scan repository to compute maximum number of collisions for hash functions
usage_UpdateRemoteRepositoryFromLocalRefs=Update remote repository from local refs
usage_WriteDirCache=Write the DirCache
usage_abbrevCommits=abbreviate commits to N + 1 digits
usage_abortConnectionIfNoActivity=abort connection if no activity
usage_actOnRemoteTrackingBranches=act on remote-tracking branches
@@ -204,6 +224,7 @@ usage_alterTheDetailShown=alter the detail shown
usage_approveDestructionOfRepository=approve destruction of repository
usage_archive=zip up files from the named tree
usage_archiveFormat=archive format. Currently supported formats: 'tar', 'zip'
usage_archiveOutput=output file to write the archive to
usage_blameLongRevision=show long revision
usage_blameRange=annotate only the given range
usage_blameRawTimestamp=show raw timestamp
@@ -220,6 +241,10 @@ usage_cached=compare against index
usage_checkout=Checkout a branch to the working tree
usage_cloneRepositoryIntoNewDir=Clone a repository into a new directory
usage_configFile=configuration file
usage_configGlobal=use global configuration in ~/.gitconfig
usage_configList=List all variables set in config file
usage_configLocal=use local configuration in .git/config
usage_configSystem=use system-wide configuration in $(prefix)/etc/gitconfig
usage_configureTheServiceInDaemonServicename=configure the service in daemon.servicename
usage_createBranchAndCheckout=create branch and checkout
usage_deleteBranchEvenIfNotMerged=delete branch (even if not merged)
@@ -253,7 +278,11 @@ usage_listBothRemoteTrackingAndLocalBranches=list both remote-tracking and local
usage_listCreateOrDeleteBranches=List, create, or delete branches
usage_logAllPretty=format:%H %ct %P' output=log --all '--pretty=format:%H %ct %P' output
usage_manageReflogInformation=Manage reflog information
usage_mergeStrategy=Use the given merge strategy. Can be supplied more than once to specify them in the order they should be tried. If there is no -s option, the resolve strategy is used. Currently the following strategies are supported: ours, theirs, simple-two-way-in-core, resolve
usage_mergeFf=When the merge resolves as a fast-forward, only update the branch pointer, without creating a merge commit.
usage_mergeNoFf=Create a merge commit even when the merge resolves as a fast-forward.
usage_mergeFfOnly=Refuse to merge and exit with a non-zero status unless the current HEAD is already up-to-date or the merge can be resolved as a fast-forward.
usage_mergeRef=Ref to be merged
usage_mergeStrategy=Use the given merge strategy. Can be supplied more than once to specify them in the order they should be tried. If there is no -s option, the recursive strategy is used. Currently the following strategies are supported: ours, theirs, simple-two-way-in-core, resolve, recursive
usage_moveRenameABranch=move/rename a branch
usage_nameStatus=show only name and status of files
usage_noCommit=Don't commit after a successful merge

+ 5
- 5
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java View File

@@ -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

+ 1
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java View File

@@ -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;

+ 1
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java View File

@@ -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 {

+ 1
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java View File

@@ -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;


+ 1
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java View File

@@ -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;

+ 1
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java View File

@@ -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;

+ 1
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java View File

@@ -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;

+ 8
- 4
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java View File

@@ -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;
}

+ 1
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java View File

@@ -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;

+ 1
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java View File

@@ -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 {

+ 3
- 2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java View File

@@ -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

+ 1
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java View File

@@ -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 {

+ 2
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java View File

@@ -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() {

+ 2
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java View File

@@ -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 {

+ 2
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java View File

@@ -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 {

+ 2
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java View File

@@ -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$


+ 2
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java View File

@@ -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 {

+ 2
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java View File

@@ -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 {

+ 2
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java View File

@@ -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;

+ 2
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java View File

@@ -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. */

+ 2
- 0
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java View File

@@ -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 {

Loading…
Cancel
Save