Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java70
1 files changed, 52 insertions, 18 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
index bf88842618..19bdd35778 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
@@ -105,7 +105,12 @@ public class PushCommand extends
private List<String> pushOptions;
/**
+ * <p>
+ * Constructor for PushCommand.
+ * </p>
+ *
* @param repo
+ * the {@link org.eclipse.jgit.lib.Repository}
*/
protected PushCommand(Repository repo) {
super(repo);
@@ -114,17 +119,12 @@ public class PushCommand extends
}
/**
- * Executes the {@code push} command with all the options and parameters
+ * {@inheritDoc}
+ * <p>
+ * Execute the {@code push} 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 an iteration over {@link PushResult} objects
- * @throws InvalidRemoteException
- * when called with an invalid remote uri
- * @throws org.eclipse.jgit.api.errors.TransportException
- * when an error occurs with the transport
- * @throws GitAPIException
*/
@Override
public Iterable<PushResult> call() throws GitAPIException,
@@ -209,6 +209,7 @@ public class PushCommand extends
*
* @see Constants#DEFAULT_REMOTE_NAME
* @param remote
+ * the remote name
* @return {@code this}
*/
public PushCommand setRemote(String remote) {
@@ -218,6 +219,8 @@ public class PushCommand extends
}
/**
+ * Get remote name
+ *
* @return the remote used for the remote operation
*/
public String getRemote() {
@@ -231,6 +234,8 @@ public class PushCommand extends
*
* @see RemoteConfig#DEFAULT_RECEIVE_PACK
* @param receivePack
+ * name of the remote executable providing the receive-pack
+ * service
* @return {@code this}
*/
public PushCommand setReceivePack(String receivePack) {
@@ -240,6 +245,8 @@ public class PushCommand extends
}
/**
+ * Get the name of the remote executable providing the receive-pack service
+ *
* @return the receive-pack used for the remote operation
*/
public String getReceivePack() {
@@ -247,6 +254,8 @@ public class PushCommand extends
}
/**
+ * Get timeout used for push operation
+ *
* @return the timeout used for the push operation
*/
public int getTimeout() {
@@ -254,6 +263,8 @@ public class PushCommand extends
}
/**
+ * Get the progress monitor
+ *
* @return the progress monitor for the push operation
*/
public ProgressMonitor getProgressMonitor() {
@@ -265,8 +276,8 @@ public class PushCommand extends
* is set to <code>NullProgressMonitor</code>
*
* @see NullProgressMonitor
- *
* @param monitor
+ * a {@link org.eclipse.jgit.lib.ProgressMonitor}
* @return {@code this}
*/
public PushCommand setProgressMonitor(ProgressMonitor monitor) {
@@ -279,7 +290,9 @@ public class PushCommand extends
}
/**
- * @return the ref lease specs
+ * Get the <code>RefLeaseSpec</code>s.
+ *
+ * @return the <code>RefLeaseSpec</code>s
* @since 4.7
*/
public List<RefLeaseSpec> getRefLeaseSpecs() {
@@ -287,10 +300,11 @@ public class PushCommand extends
}
/**
- * The ref lease specs to be used in the push operation,
- * for a force-with-lease push operation.
+ * The ref lease specs to be used in the push operation, for a
+ * force-with-lease push operation.
*
* @param specs
+ * a {@link org.eclipse.jgit.transport.RefLeaseSpec} object.
* @return {@code this}
* @since 4.7
*/
@@ -299,10 +313,11 @@ public class PushCommand extends
}
/**
- * The ref lease specs to be used in the push operation,
- * for a force-with-lease push operation.
+ * The ref lease specs to be used in the push operation, for a
+ * force-with-lease push operation.
*
* @param specs
+ * list of {@code RefLeaseSpec}s
* @return {@code this}
* @since 4.7
*/
@@ -316,6 +331,8 @@ public class PushCommand extends
}
/**
+ * Get {@code RefSpec}s.
+ *
* @return the ref specs
*/
public List<RefSpec> getRefSpecs() {
@@ -325,7 +342,7 @@ public class PushCommand extends
/**
* The ref specs to be used in the push operation
*
- * @param specs
+ * @param specs a {@link org.eclipse.jgit.transport.RefSpec} object.
* @return {@code this}
*/
public PushCommand setRefSpecs(RefSpec... specs) {
@@ -339,6 +356,7 @@ public class PushCommand extends
* The ref specs to be used in the push operation
*
* @param specs
+ * list of {@link org.eclipse.jgit.transport.RefSpec}s
* @return {@code this}
*/
public PushCommand setRefSpecs(List<RefSpec> specs) {
@@ -408,6 +426,8 @@ public class PushCommand extends
}
/**
+ * Whether to run the push operation as a dry run
+ *
* @return the dry run preference for the push operation
*/
public boolean isDryRun() {
@@ -417,7 +437,7 @@ public class PushCommand extends
/**
* Sets whether the push operation should be a dry run
*
- * @param dryRun
+ * @param dryRun a boolean.
* @return {@code this}
*/
public PushCommand setDryRun(boolean dryRun) {
@@ -427,6 +447,8 @@ public class PushCommand extends
}
/**
+ * Get the thin-pack preference
+ *
* @return the thin-pack preference for push operation
*/
public boolean isThin() {
@@ -434,11 +456,12 @@ public class PushCommand extends
}
/**
- * Sets the thin-pack preference for push operation.
+ * Set the thin-pack preference for push operation.
*
* Default setting is Transport.DEFAULT_PUSH_THIN
*
* @param thin
+ * the thin-pack preference value
* @return {@code this}
*/
public PushCommand setThin(boolean thin) {
@@ -448,6 +471,9 @@ public class PushCommand extends
}
/**
+ * Whether this push should be executed atomically (all references updated,
+ * or none)
+ *
* @return true if all-or-nothing behavior is requested.
* @since 4.2
*/
@@ -461,6 +487,7 @@ public class PushCommand extends
* Default setting is false.
*
* @param atomic
+ * whether to run the push atomically
* @return {@code this}
* @since 4.2
*/
@@ -471,6 +498,8 @@ public class PushCommand extends
}
/**
+ * Whether to push forcefully
+ *
* @return the force preference for push operation
*/
public boolean isForce() {
@@ -481,6 +510,7 @@ public class PushCommand extends
* Sets the force preference for push operation.
*
* @param force
+ * whether to push forcefully
* @return {@code this}
*/
public PushCommand setForce(boolean force) {
@@ -493,6 +523,7 @@ public class PushCommand extends
* Sets the output stream to write sideband messages to
*
* @param out
+ * an {@link java.io.OutputStream}
* @return {@code this}
* @since 3.0
*/
@@ -502,6 +533,8 @@ public class PushCommand extends
}
/**
+ * Get push options
+ *
* @return the option strings associated with the push operation
* @since 4.5
*/
@@ -510,9 +543,10 @@ public class PushCommand extends
}
/**
- * Sets the option strings associated with the push operation.
+ * Set the option strings associated with the push operation.
*
* @param pushOptions
+ * a {@link java.util.List} of push option strings
* @return {@code this}
* @since 4.5
*/

Back to the top