* Executes the {@code Add} command. Each instance of this class should only
* be used for one invocation of the command. Don't call this method twice
* on an instance.
- *
- * @return the DirCache after Add
*/
@Override
public DirCache call() throws GitAPIException, NoFilepatternException {
@@ -260,17 +265,18 @@ public class AddCommand extends GitCommand
* Executes the {@code ApplyCommand} command with all the options and
* parameters collected by the setter methods (e.g.
* {@link #setPatch(InputStream)} of this class. Each instance of this class
* should only be used for one invocation of the command. Don't call this
* method twice on an instance.
- *
- * @return an {@link ApplyResult} object representing the command result
- * @throws GitAPIException
- * @throws PatchFormatException
- * @throws PatchApplyException
*/
@Override
public ApplyResult call() throws GitAPIException, PatchFormatException,
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyResult.java
index 2ef6650e9..60561fce5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyResult.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyResult.java
@@ -47,7 +47,7 @@ import java.util.ArrayList;
import java.util.List;
/**
- * Encapsulates the result of a {@link ApplyCommand}
+ * Encapsulates the result of a {@link org.eclipse.jgit.api.ApplyCommand}
*
* @since 2.0
*/
@@ -56,6 +56,8 @@ public class ApplyResult {
private List
- * Examples (
* Create a tarball from HEAD:
*
*
@@ -103,7 +100,6 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
*
* @see Git
* documentation about archive
- *
* @since 3.1
*/
public class ArchiveCommand extends GitCommand
* Generate a list of lines with information about when the lines were
* introduced into the file path.
- *
- * @return list of lines
*/
@Override
public BlameResult call() throws GitAPIException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
index db59a9bff..507168816 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
@@ -91,7 +91,7 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
/**
* Checkout a branch to the working tree.
*
- * Examples (
* Check out an existing branch:
*
@@ -126,9 +126,9 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
* .setStartPoint("origin/stable").call();
*
*
- * @see Git documentation about Checkout
+ * @see Git
+ * documentation about Checkout
*/
public class CheckoutCommand extends GitCommand {
@@ -183,26 +183,17 @@ public class CheckoutCommand extends GitCommand {
private Set getResult.
* Executes the {@code Cherry-Pick} command with all the options and
* parameters collected by the setter methods (e.g. {@link #include(Ref)} of
* this class. Each instance of this class should only be used for one
* invocation of the command. Don't call this method twice on an instance.
- *
- * @return the result of the cherry-pick
- * @throws GitAPIException
- * @throws WrongRepositoryStateException
- * @throws ConcurrentRefUpdateException
- * @throws UnmergedPathsException
- * @throws NoMessageException
- * @throws NoHeadException
*/
@Override
public CherryPickResult call() throws GitAPIException, NoMessageException,
@@ -224,6 +221,8 @@ public class CherryPickCommand extends GitCommand
* Executes the {@code clean} command with all the options and parameters
* collected by the setter methods of this class. Each instance of this
* class should only be used for one invocation of the command (means: one
* call to {@link #call()})
- *
- * @return a set of strings representing each file cleaned.
- * @throws GitAPIException
- * @throws NoWorkTreeException
*/
@Override
public Set
* Executes the {@code Clone} command.
*
* The Git instance returned by this command needs to be closed by the
@@ -174,11 +176,6 @@ public class CloneCommand extends TransportCommand
* Executes the {@code commit} command with all the options and parameters
* collected by the setter methods of this class. Each instance of this
* class should only be used for one invocation of the command (means: one
* call to {@link #call()})
- *
- * @return a {@link RevCommit} object representing the successful commit.
- * @throws NoHeadException
- * when called on a git repo without a HEAD reference
- * @throws NoMessageException
- * when called without specifying a commit message
- * @throws UnmergedPathsException
- * when the current index contained unmerged paths (conflicts)
- * @throws ConcurrentRefUpdateException
- * when HEAD or branch ref is updated concurrently by someone
- * else
- * @throws WrongRepositoryStateException
- * when repository is not in the right state for committing
- * @throws AbortedByHookException
- * if there are either pre-commit or commit-msg hooks present in
- * the repository and one of them rejects the commit.
*/
@Override
public RevCommit call() throws GitAPIException, NoHeadException,
@@ -602,6 +591,8 @@ public class CommitCommand extends GitCommand
* By default when creating a commit containing only specified
* paths an attempt to create an empty commit leads to a
- * {@link JGitInternalException}. By setting this flag to
- *
* Describes the specified commit. Target defaults to HEAD if no commit was
* set explicitly.
- *
- * @return if there's a tag that points to the commit being described, this
- * tag name is returned. Otherwise additional suffix is added to the
- * nearest tag, just like git-describe(1).
- *
- * If none of the ancestors of the commit being described has any
- * tags at all, then this method returns null, indicating that
- * there's no way to describe this tag.
*/
@Override
public String call() throws GitAPIException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java
index b137fc53c..4c6f35114 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java
@@ -95,19 +95,22 @@ public class DiffCommand extends GitCommand
* Executes the {@code Diff} command with all the options and parameters
* collected by the setter methods (e.g. {@link #setCached(boolean)} of this
* class. Each instance of this class should only be used for one invocation
* of the command. Don't call this method twice on an instance.
- *
- * @return a DiffEntry for each path which is different
*/
@Override
public List
+ * Execute the {@code fetch} command with all the options and parameters
* collected by the setter methods of this class. Each instance of this
* class should only be used for one invocation of the command (means: one
* call to {@link #call()})
- *
- * @return a {@link FetchResult} object representing the successful fetch
- * result
- * @throws InvalidRemoteException
- * when called with an invalid remote uri
- * @throws org.eclipse.jgit.api.errors.TransportException
- * when an error occurs during transport
*/
@Override
public FetchResult call() throws GitAPIException, InvalidRemoteException,
@@ -288,6 +286,7 @@ public class FetchCommand extends TransportCommand
+ * Free resources associated with this instance.
*
- * If the repository was opened by a static factory method in this class, then
- * this method calls {@link Repository#close()} on the underlying repository
- * instance. (Whether this actually releases underlying resources, such as
- * file handles, may vary; see {@link Repository} for more details.)
+ * If the repository was opened by a static factory method in this class,
+ * then this method calls {@link Repository#close()} on the underlying
+ * repository instance. (Whether this actually releases underlying
+ * resources, such as file handles, may vary; see {@link Repository} for
+ * more details.)
*
- * If the repository was created by a caller and passed into {@link
- * #Git(Repository)} or a static factory method in this class, then this
- * method does not call close on the underlying repository.
+ * If the repository was created by a caller and passed into
+ * {@link #Git(Repository)} or a static factory method in this class, then
+ * this method does not call close on the underlying repository.
*
- * In all cases, after calling this method you should not use this {@link Git}
- * instance anymore.
+ * In all cases, after calling this method you should not use this
+ * {@link Git} instance anymore.
*
* @since 3.2
*/
@@ -154,23 +164,23 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command object to execute a {@code clone} command
+ * Return a command object to execute a {@code clone} command
*
- * @see Git documentation about clone
- * @return a {@link CloneCommand} used to collect all optional parameters
- * and to finally execute the {@code clone} command
+ * @return a {@link org.eclipse.jgit.api.CloneCommand} used to collect all
+ * optional parameters and to finally execute the {@code clone}
+ * command
*/
public static CloneCommand cloneRepository() {
return new CloneCommand();
}
/**
- * Returns a command to list remote branches/tags without a local
- * repository.
+ * Return a command to list remote branches/tags without a local repository.
*
- * @return a {@link LsRemoteCommand}
+ * @return a {@link org.eclipse.jgit.api.LsRemoteCommand}
* @since 3.1
*/
public static LsRemoteCommand lsRemoteRepository() {
@@ -178,24 +188,25 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command object to execute a {@code init} command
+ * Return a command object to execute a {@code init} command
*
- * @see Git documentation about init
- * @return a {@link InitCommand} used to collect all optional parameters and
- * to finally execute the {@code init} command
+ * @see Git
+ * documentation about init
+ * @return a {@link org.eclipse.jgit.api.InitCommand} used to collect all
+ * optional parameters and to finally execute the {@code init}
+ * command
*/
public static InitCommand init() {
return new InitCommand();
}
/**
- * Constructs a new {@link Git} object which can interact with the specified
- * git repository.
+ * Construct a new {@link org.eclipse.jgit.api.Git} object which can
+ * interact with the specified git repository.
*
- * All command classes returned by methods of this class will always interact
- * with this git repository.
+ * All command classes returned by methods of this class will always
+ * interact with this git repository.
*
* The caller is responsible for closing the repository; {@link #close()} on
* this instance does not close the repo.
@@ -216,75 +227,78 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command object to execute a {@code Commit} command
+ * Return a command object to execute a {@code Commit} command
*
- * @see Git documentation about Commit
- * @return a {@link CommitCommand} used to collect all optional parameters
- * and to finally execute the {@code Commit} command
+ * @return a {@link org.eclipse.jgit.api.CommitCommand} used to collect all
+ * optional parameters and to finally execute the {@code Commit}
+ * command
*/
public CommitCommand commit() {
return new CommitCommand(repo);
}
/**
- * Returns a command object to execute a {@code Log} command
+ * Return a command object to execute a {@code Log} command
*
- * @see Git documentation about Log
- * @return a {@link LogCommand} used to collect all optional parameters and
- * to finally execute the {@code Log} command
+ * @see Git
+ * documentation about Log
+ * @return a {@link org.eclipse.jgit.api.LogCommand} used to collect all
+ * optional parameters and to finally execute the {@code Log}
+ * command
*/
public LogCommand log() {
return new LogCommand(repo);
}
/**
- * Returns a command object to execute a {@code Merge} command
+ * Return a command object to execute a {@code Merge} command
*
- * @see Git documentation about Merge
- * @return a {@link MergeCommand} used to collect all optional parameters
- * and to finally execute the {@code Merge} command
+ * @return a {@link org.eclipse.jgit.api.MergeCommand} used to collect all
+ * optional parameters and to finally execute the {@code Merge}
+ * command
*/
public MergeCommand merge() {
return new MergeCommand(repo);
}
/**
- * Returns a command object to execute a {@code Pull} command
+ * Return a command object to execute a {@code Pull} command
*
- * @return a {@link PullCommand}
+ * @return a {@link org.eclipse.jgit.api.PullCommand}
*/
public PullCommand pull() {
return new PullCommand(repo);
}
/**
- * Returns a command object used to create branches
+ * Return a command object used to create branches
*
- * @return a {@link CreateBranchCommand}
+ * @return a {@link org.eclipse.jgit.api.CreateBranchCommand}
*/
public CreateBranchCommand branchCreate() {
return new CreateBranchCommand(repo);
}
/**
- * Returns a command object used to delete branches
+ * Return a command object used to delete branches
*
- * @return a {@link DeleteBranchCommand}
+ * @return a {@link org.eclipse.jgit.api.DeleteBranchCommand}
*/
public DeleteBranchCommand branchDelete() {
return new DeleteBranchCommand(repo);
}
/**
- * Returns a command object used to list branches
+ * Return a command object used to list branches
*
- * @return a {@link ListBranchCommand}
+ * @return a {@link org.eclipse.jgit.api.ListBranchCommand}
*/
public ListBranchCommand branchList() {
return new ListBranchCommand(repo);
@@ -292,170 +306,180 @@ public class Git implements AutoCloseable {
/**
*
- * Returns a command object used to list tags
+ * Return a command object used to list tags
*
- * @return a {@link ListTagCommand}
+ * @return a {@link org.eclipse.jgit.api.ListTagCommand}
*/
public ListTagCommand tagList() {
return new ListTagCommand(repo);
}
/**
- * Returns a command object used to rename branches
+ * Return a command object used to rename branches
*
- * @return a {@link RenameBranchCommand}
+ * @return a {@link org.eclipse.jgit.api.RenameBranchCommand}
*/
public RenameBranchCommand branchRename() {
return new RenameBranchCommand(repo);
}
/**
- * Returns a command object to execute a {@code Add} command
+ * Return a command object to execute a {@code Add} command
*
- * @see Git documentation about Add
- * @return a {@link AddCommand} used to collect all optional parameters and
- * to finally execute the {@code Add} command
+ * @see Git
+ * documentation about Add
+ * @return a {@link org.eclipse.jgit.api.AddCommand} used to collect all
+ * optional parameters and to finally execute the {@code Add}
+ * command
*/
public AddCommand add() {
return new AddCommand(repo);
}
/**
- * Returns a command object to execute a {@code Tag} command
+ * Return a command object to execute a {@code Tag} command
*
- * @see Git documentation about Tag
- * @return a {@link TagCommand} used to collect all optional parameters and
- * to finally execute the {@code Tag} command
+ * @see Git
+ * documentation about Tag
+ * @return a {@link org.eclipse.jgit.api.TagCommand} used to collect all
+ * optional parameters and to finally execute the {@code Tag}
+ * command
*/
public TagCommand tag() {
return new TagCommand(repo);
}
/**
- * Returns a command object to execute a {@code Fetch} command
+ * Return a command object to execute a {@code Fetch} command
*
- * @see Git documentation about Fetch
- * @return a {@link FetchCommand} used to collect all optional parameters
- * and to finally execute the {@code Fetch} command
+ * @return a {@link org.eclipse.jgit.api.FetchCommand} used to collect all
+ * optional parameters and to finally execute the {@code Fetch}
+ * command
*/
public FetchCommand fetch() {
return new FetchCommand(repo);
}
/**
- * Returns a command object to execute a {@code Push} command
+ * Return a command object to execute a {@code Push} command
*
- * @see Git documentation about Push
- * @return a {@link PushCommand} used to collect all optional parameters and
- * to finally execute the {@code Push} command
+ * @see Git
+ * documentation about Push
+ * @return a {@link org.eclipse.jgit.api.PushCommand} used to collect all
+ * optional parameters and to finally execute the {@code Push}
+ * command
*/
public PushCommand push() {
return new PushCommand(repo);
}
/**
- * Returns a command object to execute a {@code cherry-pick} command
+ * Return a command object to execute a {@code cherry-pick} command
*
- * @see Git documentation about cherry-pick
- * @return a {@link CherryPickCommand} used to collect all optional
- * parameters and to finally execute the {@code cherry-pick} command
+ * @return a {@link org.eclipse.jgit.api.CherryPickCommand} used to collect
+ * all optional parameters and to finally execute the
+ * {@code cherry-pick} command
*/
public CherryPickCommand cherryPick() {
return new CherryPickCommand(repo);
}
/**
- * Returns a command object to execute a {@code revert} command
+ * Return a command object to execute a {@code revert} command
*
- * @see Git documentation about reverting changes
- * @return a {@link RevertCommand} used to collect all optional parameters
- * and to finally execute the {@code cherry-pick} command
+ * @return a {@link org.eclipse.jgit.api.RevertCommand} used to collect all
+ * optional parameters and to finally execute the
+ * {@code cherry-pick} command
*/
public RevertCommand revert() {
return new RevertCommand(repo);
}
/**
- * Returns a command object to execute a {@code Rebase} command
+ * Return a command object to execute a {@code Rebase} command
*
- * @see Git documentation about rebase
- * @return a {@link RebaseCommand} used to collect all optional parameters
- * and to finally execute the {@code rebase} command
+ * @return a {@link org.eclipse.jgit.api.RebaseCommand} used to collect all
+ * optional parameters and to finally execute the {@code rebase}
+ * command
*/
public RebaseCommand rebase() {
return new RebaseCommand(repo);
}
/**
- * Returns a command object to execute a {@code rm} command
+ * Return a command object to execute a {@code rm} command
*
- * @see Git documentation about rm
- * @return a {@link RmCommand} used to collect all optional parameters and
- * to finally execute the {@code rm} command
+ * @see Git
+ * documentation about rm
+ * @return a {@link org.eclipse.jgit.api.RmCommand} used to collect all
+ * optional parameters and to finally execute the {@code rm} command
*/
public RmCommand rm() {
return new RmCommand(repo);
}
/**
- * Returns a command object to execute a {@code checkout} command
+ * Return a command object to execute a {@code checkout} command
*
- * @see Git documentation about checkout
- * @return a {@link CheckoutCommand} used to collect all optional parameters
- * and to finally execute the {@code checkout} command
+ * @return a {@link org.eclipse.jgit.api.CheckoutCommand} used to collect
+ * all optional parameters and to finally execute the
+ * {@code checkout} command
*/
public CheckoutCommand checkout() {
return new CheckoutCommand(repo);
}
/**
- * Returns a command object to execute a {@code reset} command
+ * Return a command object to execute a {@code reset} command
*
- * @see Git documentation about reset
- * @return a {@link ResetCommand} used to collect all optional parameters
- * and to finally execute the {@code reset} command
+ * @return a {@link org.eclipse.jgit.api.ResetCommand} used to collect all
+ * optional parameters and to finally execute the {@code reset}
+ * command
*/
public ResetCommand reset() {
return new ResetCommand(repo);
}
/**
- * Returns a command object to execute a {@code status} command
+ * Return a command object to execute a {@code status} command
*
- * @see Git documentation about status
- * @return a {@link StatusCommand} used to collect all optional parameters
- * and to finally execute the {@code status} command
+ * @return a {@link org.eclipse.jgit.api.StatusCommand} used to collect all
+ * optional parameters and to finally execute the {@code status}
+ * command
*/
public StatusCommand status() {
return new StatusCommand(repo);
}
/**
- * Returns a command to create an archive from a tree
+ * Return a command to create an archive from a tree
*
- * @return a {@link ArchiveCommand}
+ * @return a {@link org.eclipse.jgit.api.ArchiveCommand}
* @since 3.1
*/
public ArchiveCommand archive() {
@@ -463,179 +487,185 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command to add notes to an object
+ * Return a command to add notes to an object
*
- * @return a {@link AddNoteCommand}
+ * @return a {@link org.eclipse.jgit.api.AddNoteCommand}
*/
public AddNoteCommand notesAdd() {
return new AddNoteCommand(repo);
}
/**
- * Returns a command to remove notes on an object
+ * Return a command to remove notes on an object
*
- * @return a {@link RemoveNoteCommand}
+ * @return a {@link org.eclipse.jgit.api.RemoveNoteCommand}
*/
public RemoveNoteCommand notesRemove() {
return new RemoveNoteCommand(repo);
}
/**
- * Returns a command to list all notes
+ * Return a command to list all notes
*
- * @return a {@link ListNotesCommand}
+ * @return a {@link org.eclipse.jgit.api.ListNotesCommand}
*/
public ListNotesCommand notesList() {
return new ListNotesCommand(repo);
}
/**
- * Returns a command to show notes on an object
+ * Return a command to show notes on an object
*
- * @return a {@link ShowNoteCommand}
+ * @return a {@link org.eclipse.jgit.api.ShowNoteCommand}
*/
public ShowNoteCommand notesShow() {
return new ShowNoteCommand(repo);
}
/**
- * Returns a command object to execute a {@code ls-remote} command
+ * Return a command object to execute a {@code ls-remote} command
*
- * @see Git documentation about ls-remote
- * @return a {@link LsRemoteCommand} used to collect all optional parameters
- * and to finally execute the {@code status} command
+ * @return a {@link org.eclipse.jgit.api.LsRemoteCommand} used to collect
+ * all optional parameters and to finally execute the {@code status}
+ * command
*/
public LsRemoteCommand lsRemote() {
return new LsRemoteCommand(repo);
}
/**
- * Returns a command object to execute a {@code clean} command
+ * Return a command object to execute a {@code clean} command
*
- * @see Git documentation about Clean
- * @return a {@link CleanCommand} used to collect all optional parameters
- * and to finally execute the {@code clean} command
+ * @return a {@link org.eclipse.jgit.api.CleanCommand} used to collect all
+ * optional parameters and to finally execute the {@code clean}
+ * command
*/
public CleanCommand clean() {
return new CleanCommand(repo);
}
/**
- * Returns a command object to execute a {@code blame} command
+ * Return a command object to execute a {@code blame} command
*
- * @see Git documentation about Blame
- * @return a {@link BlameCommand} used to collect all optional parameters
- * and to finally execute the {@code blame} command
+ * @return a {@link org.eclipse.jgit.api.BlameCommand} used to collect all
+ * optional parameters and to finally execute the {@code blame}
+ * command
*/
public BlameCommand blame() {
return new BlameCommand(repo);
}
/**
- * Returns a command object to execute a {@code reflog} command
+ * Return a command object to execute a {@code reflog} command
*
- * @see Git documentation about reflog
- * @return a {@link ReflogCommand} used to collect all optional parameters
- * and to finally execute the {@code reflog} command
+ * @return a {@link org.eclipse.jgit.api.ReflogCommand} used to collect all
+ * optional parameters and to finally execute the {@code reflog}
+ * command
*/
public ReflogCommand reflog() {
return new ReflogCommand(repo);
}
/**
- * Returns a command object to execute a {@code diff} command
+ * Return a command object to execute a {@code diff} command
*
- * @see Git documentation about diff
- * @return a {@link DiffCommand} used to collect all optional parameters and
- * to finally execute the {@code diff} command
+ * @see Git
+ * documentation about diff
+ * @return a {@link org.eclipse.jgit.api.DiffCommand} used to collect all
+ * optional parameters and to finally execute the {@code diff}
+ * command
*/
public DiffCommand diff() {
return new DiffCommand(repo);
}
/**
- * Returns a command object used to delete tags
+ * Return a command object used to delete tags
*
- * @return a {@link DeleteTagCommand}
+ * @return a {@link org.eclipse.jgit.api.DeleteTagCommand}
*/
public DeleteTagCommand tagDelete() {
return new DeleteTagCommand(repo);
}
/**
- * Returns a command object to execute a {@code submodule add} command
+ * Return a command object to execute a {@code submodule add} command
*
- * @return a {@link SubmoduleAddCommand} used to add a new submodule to a
- * parent repository
+ * @return a {@link org.eclipse.jgit.api.SubmoduleAddCommand} used to add a
+ * new submodule to a parent repository
*/
public SubmoduleAddCommand submoduleAdd() {
return new SubmoduleAddCommand(repo);
}
/**
- * Returns a command object to execute a {@code submodule init} command
+ * Return a command object to execute a {@code submodule init} command
*
- * @return a {@link SubmoduleInitCommand} used to initialize the
- * repository's config with settings from the .gitmodules file in
- * the working tree
+ * @return a {@link org.eclipse.jgit.api.SubmoduleInitCommand} used to
+ * initialize the repository's config with settings from the
+ * .gitmodules file in the working tree
*/
public SubmoduleInitCommand submoduleInit() {
return new SubmoduleInitCommand(repo);
}
/**
- * Returns a command object to execute a {@code submodule status} command
+ * Return a command object to execute a {@code submodule status} command
*
- * @return a {@link SubmoduleStatusCommand} used to report the status of a
- * repository's configured submodules
+ * @return a {@link org.eclipse.jgit.api.SubmoduleStatusCommand} used to
+ * report the status of a repository's configured submodules
*/
public SubmoduleStatusCommand submoduleStatus() {
return new SubmoduleStatusCommand(repo);
}
/**
- * Returns a command object to execute a {@code submodule sync} command
+ * Return a command object to execute a {@code submodule sync} command
*
- * @return a {@link SubmoduleSyncCommand} used to update the URL of a
- * submodule from the parent repository's .gitmodules file
+ * @return a {@link org.eclipse.jgit.api.SubmoduleSyncCommand} used to
+ * update the URL of a submodule from the parent repository's
+ * .gitmodules file
*/
public SubmoduleSyncCommand submoduleSync() {
return new SubmoduleSyncCommand(repo);
}
/**
- * Returns a command object to execute a {@code submodule update} command
+ * Return a command object to execute a {@code submodule update} command
*
- * @return a {@link SubmoduleUpdateCommand} used to update the submodules in
- * a repository to the configured revision
+ * @return a {@link org.eclipse.jgit.api.SubmoduleUpdateCommand} used to
+ * update the submodules in a repository to the configured revision
*/
public SubmoduleUpdateCommand submoduleUpdate() {
return new SubmoduleUpdateCommand(repo);
}
/**
- * Returns a command object used to list stashed commits
+ * Return a command object used to list stashed commits
*
- * @return a {@link StashListCommand}
+ * @return a {@link org.eclipse.jgit.api.StashListCommand}
*/
public StashListCommand stashList() {
return new StashListCommand(repo);
}
/**
- * Returns a command object used to create a stashed commit
+ * Return a command object used to create a stashed commit
*
- * @return a {@link StashCreateCommand}
+ * @return a {@link org.eclipse.jgit.api.StashCreateCommand}
* @since 2.0
*/
public StashCreateCommand stashCreate() {
@@ -643,9 +673,9 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command object used to apply a stashed commit
+ * Returs a command object used to apply a stashed commit
*
- * @return a {@link StashApplyCommand}
+ * @return a {@link org.eclipse.jgit.api.StashApplyCommand}
* @since 2.0
*/
public StashApplyCommand stashApply() {
@@ -653,9 +683,9 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command object used to drop a stashed commit
+ * Return a command object used to drop a stashed commit
*
- * @return a {@link StashDropCommand}
+ * @return a {@link org.eclipse.jgit.api.StashDropCommand}
* @since 2.0
*/
public StashDropCommand stashDrop() {
@@ -663,14 +693,14 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command object to execute a {@code apply} command
+ * Return a command object to execute a {@code apply} command
*
- * @see Git documentation about apply
- *
- * @return a {@link ApplyCommand} used to collect all optional parameters
- * and to finally execute the {@code apply} command
+ * @return a {@link org.eclipse.jgit.api.ApplyCommand} used to collect all
+ * optional parameters and to finally execute the {@code apply}
+ * command
* @since 2.0
*/
public ApplyCommand apply() {
@@ -678,14 +708,14 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command object to execute a {@code gc} command
- *
- * @see Git documentation about gc
+ * Return a command object to execute a {@code gc} command
*
- * @return a {@link GarbageCollectCommand} used to collect all optional
- * parameters and to finally execute the {@code gc} command
+ * @see Git
+ * documentation about gc
+ * @return a {@link org.eclipse.jgit.api.GarbageCollectCommand} used to
+ * collect all optional parameters and to finally execute the
+ * {@code gc} command
* @since 2.2
*/
public GarbageCollectCommand gc() {
@@ -693,9 +723,9 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command object to find human-readable names of revisions.
+ * Return a command object to find human-readable names of revisions.
*
- * @return a {@link NameRevCommand}.
+ * @return a {@link org.eclipse.jgit.api.NameRevCommand}.
* @since 3.0
*/
public NameRevCommand nameRev() {
@@ -703,10 +733,10 @@ public class Git implements AutoCloseable {
}
/**
- * Returns a command object to come up with a short name that describes a
+ * Return a command object to come up with a short name that describes a
* commit in terms of the nearest git tag.
*
- * @return a {@link DescribeCommand}.
+ * @return a {@link org.eclipse.jgit.api.DescribeCommand}.
* @since 3.2
*/
public DescribeCommand describe() {
@@ -716,7 +746,7 @@ public class Git implements AutoCloseable {
/**
* Return a command used to list the available remotes.
*
- * @return a {@link RemoteListCommand}
+ * @return a {@link org.eclipse.jgit.api.RemoteListCommand}
* @since 4.2
*/
public RemoteListCommand remoteList() {
@@ -726,7 +756,7 @@ public class Git implements AutoCloseable {
/**
* Return a command used to add a new remote.
*
- * @return a {@link RemoteAddCommand}
+ * @return a {@link org.eclipse.jgit.api.RemoteAddCommand}
* @since 4.2
*/
public RemoteAddCommand remoteAdd() {
@@ -736,7 +766,7 @@ public class Git implements AutoCloseable {
/**
* Return a command used to remove an existing remote.
*
- * @return a {@link RemoteRemoveCommand}
+ * @return a {@link org.eclipse.jgit.api.RemoteRemoveCommand}
* @since 4.2
*/
public RemoteRemoveCommand remoteRemove() {
@@ -746,7 +776,7 @@ public class Git implements AutoCloseable {
/**
* Return a command used to change the URL of an existing remote.
*
- * @return a {@link RemoteSetUrlCommand}
+ * @return a {@link org.eclipse.jgit.api.RemoteSetUrlCommand}
* @since 4.2
*/
public RemoteSetUrlCommand remoteSetUrl() {
@@ -754,6 +784,8 @@ public class Git implements AutoCloseable {
}
/**
+ * Get repository
+ *
* @return the git repository this class is interacting with; see
* {@link #close()} for notes on closing this repository.
*/
@@ -761,6 +793,7 @@ public class Git implements AutoCloseable {
return repo;
}
+ /** {@inheritDoc} */
@Override
public String toString() {
return "Git[" + repo + "]"; //$NON-NLS-1$//$NON-NLS-2$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java
index 2a23408b5..ee7d75cf9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java
@@ -48,18 +48,20 @@ import org.eclipse.jgit.lib.Repository;
/**
* Common superclass of all commands in the package {@code org.eclipse.jgit.api}
*
- * This class ensures that all commands fulfill the {@link Callable} interface.
- * It also has a property {@link #repo} holding a reference to the git
- * {@link Repository} this command should work with.
+ * This class ensures that all commands fulfill the
+ * {@link java.util.concurrent.Callable} interface. It also has a property
+ * {@link #repo} holding a reference to the git
+ * {@link org.eclipse.jgit.lib.Repository} this command should work with.
*
* Finally this class stores a state telling whether it is allowed to call
- * {@link #call()} on this instance. Instances of {@link GitCommand} can only be
- * used for one single successful call to {@link #call()}. Afterwards this
- * instance may not be used anymore to set/modify any properties or to call
- * {@link #call()} again. This is achieved by setting the {@link #callable}
- * property to false after the successful execution of {@link #call()} and to
- * check the state (by calling {@link #checkCallable()}) before setting of
- * properties and inside {@link #call()}.
+ * {@link #call()} on this instance. Instances of
+ * {@link org.eclipse.jgit.api.GitCommand} can only be used for one single
+ * successful call to {@link #call()}. Afterwards this instance may not be used
+ * anymore to set/modify any properties or to call {@link #call()} again. This
+ * is achieved by setting the {@link #callable} property to false after the
+ * successful execution of {@link #call()} and to check the state (by calling
+ * {@link #checkCallable()}) before setting of properties and inside
+ * {@link #call()}.
*
* @param
+ * Execute the command
*/
@Override
public abstract T call() throws GitAPIException;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java
index 649484cf6..293d63f5c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java
@@ -69,9 +69,9 @@ public class InitCommand implements Callable
* Executes the {@code Init} command.
- *
- * @return the newly created {@code Git} object with associated repository
*/
@Override
public Git call() throws GitAPIException {
@@ -127,7 +127,7 @@ public class InitCommand implements Callablegit
is a {@link Git} instance):
+ * Examples (git
is a {@link org.eclipse.jgit.api.Git} instance):
*
* ArchiveCommand.registerFormat("tar", new TarFormat());
* try {
- * git.archive()
- * .setTree(db.resolve("HEAD"))
- * .setOutputStream(out)
- * .call();
+ * git.archive().setTree(db.resolve("HEAD")).setOutputStream(out).call();
* } finally {
- * ArchiveCommand.unregisterFormat("tar");
+ * ArchiveCommand.unregisterFormat("tar");
* }
*
* git
is a {@link Git} instance):
+ * Examples (git
is a {@link org.eclipse.jgit.api.Git} instance):
* null
or otherwise
- * invalid
- * @throws CheckoutConflictException
- * if the checkout results in a conflict
- * @return the newly created branch
- */
+ /** {@inheritDoc} */
@Override
public Ref call() throws GitAPIException, RefAlreadyExistsException,
RefNotFoundException, InvalidRefNameException,
@@ -418,11 +409,12 @@ public class CheckoutCommand extends GitCommand {
/**
* Checkout paths into index and working directory, firing a
- * {@link WorkingTreeModifiedEvent} if the working tree was modified.
+ * {@link org.eclipse.jgit.events.WorkingTreeModifiedEvent} if the working
+ * tree was modified.
*
* @return this instance
- * @throws IOException
- * @throws RefNotFoundException
+ * @throws java.io.IOException
+ * @throws org.eclipse.jgit.api.errors.RefNotFoundException
*/
protected CheckoutCommand checkoutPaths() throws IOException,
RefNotFoundException {
@@ -739,6 +731,8 @@ public class CheckoutCommand extends GitCommand {
}
/**
+ * null
*/
public CheckoutResult getResult() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutResult.java
index 2186eb4b5..16f4685bc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutResult.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutResult.java
@@ -46,8 +46,7 @@ import java.util.ArrayList;
import java.util.List;
/**
- * Encapsulates the result of a {@link CheckoutCommand}
- *
+ * Encapsulates the result of a {@link org.eclipse.jgit.api.CheckoutCommand}
*/
public class CheckoutResult {
@@ -168,6 +167,8 @@ public class CheckoutResult {
}
/**
+ * Get status
+ *
* @return the status
*/
public Status getStatus() {
@@ -175,33 +176,44 @@ public class CheckoutResult {
}
/**
+ * Get list of file that created a checkout conflict
+ *
* @return the list of files that created a checkout conflict, or an empty
- * list if {@link #getStatus()} is not {@link Status#CONFLICTS};
+ * list if {@link #getStatus()} is not
+ * {@link org.eclipse.jgit.api.CheckoutResult.Status#CONFLICTS};
*/
public Listnull
if {@link #getStatus} is not
- * {@link CherryPickStatus#OK}
+ * {@link org.eclipse.jgit.api.CherryPickResult.CherryPickStatus#OK}
*/
public RevCommit getNewHead() {
return newHead;
}
/**
+ * Get the cherry-picked {@code Ref}s
+ *
* @return the list of successfully cherry-picked Ref
's,
* null
if {@link #getStatus} is not
- * {@link CherryPickStatus#OK}
+ * {@link org.eclipse.jgit.api.CherryPickResult.CherryPickStatus#OK}
*/
public List getCherryPickedRefs() {
return cherryPickedRefs;
}
/**
+ * Get the list of paths causing this cherry-pick to fail
+ *
* @return the list of paths causing this cherry-pick to fail (see
- * {@link ResolveMerger#getFailingPaths()} for details),
- * null
if {@link #getStatus} is not
- * {@link CherryPickStatus#FAILED}
+ * {@link org.eclipse.jgit.merge.ResolveMerger#getFailingPaths()}
+ * for details), null
if {@link #getStatus} is not
+ * {@link org.eclipse.jgit.api.CherryPickResult.CherryPickStatus#FAILED}
*/
public Maprefs/heads/master
),
- * branch name (master
) or tag name (v1.2.3
).
- * The default is to use the branch pointed to by the cloned
- * repository's HEAD and can be requested by passing {@code null}
- * or HEAD
.
+ * branch name (master
) or tag name
+ * (v1.2.3
). The default is to use the branch
+ * pointed to by the cloned repository's HEAD and can be
+ * requested by passing {@code null} or HEAD
.
* @return this instance
*/
public CloneCommand setBranch(String branch) {
@@ -558,8 +562,8 @@ public class CloneCommand extends TransportCommandNullProgressMonitor
*
* @see NullProgressMonitor
- *
* @param monitor
+ * a {@link org.eclipse.jgit.lib.ProgressMonitor}
* @return {@code this}
*/
public CloneCommand setProgressMonitor(ProgressMonitor monitor) {
@@ -571,6 +575,8 @@ public class CloneCommand extends TransportCommandtrue
no branch will be checked out
* after the clone. This enhances performance of the clone
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
index e29fc0546..8a89ba161 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
@@ -140,33 +140,22 @@ public class CommitCommand extends GitCommandtrue
this exception will not be thrown.
+ * {@link org.eclipse.jgit.api.errors.JGitInternalException}. By
+ * setting this flag to true
this exception will not
+ * be thrown.
* @return {@code this}
* @since 4.2
*/
@@ -634,6 +628,8 @@ public class CommitCommand extends GitCommandcommit
*/
public String getMessage() {
@@ -673,10 +669,12 @@ public class CommitCommand extends GitCommandnull
or otherwise
- * invalid
- * @return the newly created branch
- */
+ /** {@inheritDoc} */
@Override
public Ref call() throws GitAPIException, RefAlreadyExistsException,
RefNotFoundException, InvalidRefNameException {
@@ -297,6 +290,8 @@ public class CreateBranchCommand extends GitCommand {
}
/**
+ * Set the name of the new branch
+ *
* @param name
* the name of the new branch
* @return this instance
@@ -308,6 +303,8 @@ public class CreateBranchCommand extends GitCommand {
}
/**
+ * Set whether to create the branch forcefully
+ *
* @param force
* if true
and the branch with the given name
* already exists, the start-point of an existing branch will be
@@ -322,6 +319,8 @@ public class CreateBranchCommand extends GitCommand {
}
/**
+ * Set the start point
+ *
* @param startPoint
* corresponds to the start-point option; if null
,
* the current HEAD will be used
@@ -335,6 +334,8 @@ public class CreateBranchCommand extends GitCommand {
}
/**
+ * Set the start point
+ *
* @param startPoint
* corresponds to the start-point option; if null
,
* the current HEAD will be used
@@ -348,6 +349,8 @@ public class CreateBranchCommand extends GitCommand {
}
/**
+ * Set the upstream mode
+ *
* @param mode
* corresponds to the --track/--no-track/--set-upstream options;
* may be null
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java
index d7e7e5c29..31e7281d6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java
@@ -84,19 +84,16 @@ public class DeleteBranchCommand extends GitCommand> {
private boolean force;
/**
+ * Constructor for DeleteBranchCommand
+ *
* @param repo
+ * the {@link org.eclipse.jgit.lib.Repository}
*/
protected DeleteBranchCommand(Repository repo) {
super(repo);
}
- /**
- * @throws NotMergedException
- * when trying to delete a branch which has not been merged into
- * the currently checked out branch without force
- * @throws CannotDeleteCurrentBranchException
- * @return the list with the (full) names of the deleted branches
- */
+ /** {@inheritDoc} */
@Override
public List
> {
}
/**
+ * Set the names of the branches to delete
+ *
* @param branchnames
* the names of the branches to delete; if not set, this will do
* nothing; invalid branch names will simply be ignored
@@ -195,6 +194,8 @@ public class DeleteBranchCommand extends GitCommand
> {
}
/**
+ * Set whether to forcefully delete branches
+ *
* @param force
*
true
corresponds to the -D option,
* false
to the -d option (default)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java
index 77e353999..63a090caf 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java
@@ -71,15 +71,16 @@ public class DeleteTagCommand extends GitCommand> {
private final Set
> {
}
/**
+ * Set names of the tags to delete
+ *
* @param tags
* the names of the tags to delete; if not set, this will do
* nothing; invalid tag names will simply be ignored
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java
index 68b1bd9e2..01fe4aa9e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java
@@ -104,8 +104,10 @@ public class DescribeCommand extends GitCommand
true
if always the long format should be used.
* @return {@code this}
- *
* @see Git documentation about describe
@@ -180,15 +182,17 @@ public class DescribeCommand extends GitCommand> {
private ProgressMonitor monitor = NullProgressMonitor.INSTANCE;
/**
+ * Constructor for DiffCommand
+ *
* @param repo
+ * a {@link org.eclipse.jgit.lib.Repository} object.
*/
protected DiffCommand(Repository repo) {
super(repo);
}
/**
+ * {@inheritDoc}
+ *
> {
}
/**
+ * Whether to view the changes staged for the next commit
*
* @param cached
- * whether to view the changes you staged for the next commit
+ * whether to view the changes staged for the next commit
* @return this instance
*/
public DiffCommand setCached(boolean cached) {
@@ -173,6 +177,8 @@ public class DiffCommand extends GitCommand
> {
}
/**
+ * Set path filter
+ *
* @param pathFilter
* parameter, used to limit the diff to the named path
* @return this instance
@@ -183,6 +189,8 @@ public class DiffCommand extends GitCommand
> {
}
/**
+ * Set old tree
+ *
* @param oldTree
* the previous state
* @return this instance
@@ -193,6 +201,8 @@ public class DiffCommand extends GitCommand
> {
}
/**
+ * Set new tree
+ *
* @param newTree
* the updated state
* @return this instance
@@ -203,6 +213,8 @@ public class DiffCommand extends GitCommand
> {
}
/**
+ * Set whether to return only names and status of changed files
+ *
* @param showNameAndStatusOnly
* whether to return only names and status of changed files
* @return this instance
@@ -213,6 +225,8 @@ public class DiffCommand extends GitCommand
> {
}
/**
+ * Set output stream
+ *
* @param out
* the stream to write line data
* @return this instance
@@ -263,7 +277,6 @@ public class DiffCommand extends GitCommand
> {
* is set to
NullProgressMonitor
*
* @see NullProgressMonitor
- *
* @param monitor
* a progress monitor
* @return this instance
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
index 5270283ed..b2c28dab0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
@@ -122,7 +122,10 @@ public class FetchCommand extends TransportCommandNullProgressMonitor
*
* @see NullProgressMonitor
- *
* @param monitor
+ * a {@link org.eclipse.jgit.lib.ProgressMonitor}
* @return {@code this}
*/
public FetchCommand setProgressMonitor(ProgressMonitor monitor) {
@@ -384,6 +396,8 @@ public class FetchCommand extends TransportCommandexpire
will not be pruned. Only
* older objects may be pruned. If set to null then every object is a
- * candidate for pruning. Use {@link GitDateParser} to parse time formats
- * used by git gc.
+ * candidate for pruning. Use {@link org.eclipse.jgit.util.GitDateParser} to
+ * parse time formats used by git gc.
*
* @param expire
* minimal age of objects to be pruned.
@@ -191,6 +195,7 @@ public class GarbageCollectCommand extends GitCommand> {
}
/**
+ * Constructor for ListBranchCommand.
+ *
* @param repo
+ * a {@link org.eclipse.jgit.lib.Repository} object.
*/
protected ListBranchCommand(Repository repo) {
super(repo);
}
+ /** {@inheritDoc} */
@Override
public List call() throws GitAPIException {
checkCallable();
@@ -154,6 +158,8 @@ public class ListBranchCommand extends GitCommand
> {
}
/**
+ * Set the list mode
+ *
* @param listMode
* optional: corresponds to the -r/-a options; by default, only
* local branches will be listed
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java
index 476c10bdb..41691fbfc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java
@@ -68,15 +68,16 @@ public class ListNotesCommand extends GitCommand
> {
private String notesRef = Constants.R_NOTES_COMMITS;
/**
+ * Constructor for ListNotesCommand.
+ *
* @param repo
+ * the {@link org.eclipse.jgit.lib.Repository}
*/
protected ListNotesCommand(Repository repo) {
super(repo);
}
- /**
- * @return the requested notes
- */
+ /** {@inheritDoc} */
@Override
public List
> {
}
/**
+ * Set the {@code Ref} to read notes from
+ *
* @param notesRef
- * the ref to read notes from. Note, the default value of
- * {@link Constants#R_NOTES_COMMITS} will be used if nothing is
- * set
+ * the name of the {@code Ref} to read notes from. Note, the
+ * default value of
+ * {@link org.eclipse.jgit.lib.Constants#R_NOTES_COMMITS} will be
+ * used if nothing is set
* @return {@code this}
- *
* @see Constants#R_NOTES_COMMITS
*/
public ListNotesCommand setNotesRef(String notesRef) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java
index d649a53db..9161211d7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java
@@ -65,15 +65,16 @@ import org.eclipse.jgit.revwalk.RevWalk;
public class ListTagCommand extends GitCommand