summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org
diff options
context:
space:
mode:
authorDan Wang <dwwang@google.com>2016-06-03 16:39:45 -0700
committerDan Wang <dwwang@google.com>2016-07-22 15:40:54 -0700
commit7f9fb8000252ac57b1613539927e34c9cdb9ef9b (patch)
treea9a877a5720bb77079210f50c6491c452bddd2c3 /org.eclipse.jgit.pgm/src/org
parent0d2a7b7737f0d723866ac1fcf7ac82311a13ae3b (diff)
downloadjgit-7f9fb8000252ac57b1613539927e34c9cdb9ef9b.tar.gz
jgit-7f9fb8000252ac57b1613539927e34c9cdb9ef9b.zip
Push implementation of option strings
Example usage: $ ./jgit push \ --push-option "Reviewer=j.doe@example.org" \ --push-option "<arbitrary string>" \ origin HEAD:refs/for/master Stefan Beller has also made an equivalent change to CGit: http://thread.gmane.org/gmane.comp.version-control.git/299872 Change-Id: I6797e50681054dce3bd179e80b731aef5e200d77 Signed-off-by: Dan Wang <dwwang@google.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
index 33ea1deb8e..1a4b5525b6 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
@@ -108,6 +108,9 @@ class Push extends TextBuiltin {
@Option(name = "--dry-run")
private boolean dryRun;
+ @Option(name = "--push-option", aliases = { "-t" })
+ private List<String> pushOptions = new ArrayList<>();
+
private boolean shownURI;
@Override
@@ -127,6 +130,7 @@ class Push extends TextBuiltin {
push.setThin(thin);
push.setAtomic(atomic);
push.setTimeout(timeout);
+ push.setPushOptions(pushOptions);
Iterable<PushResult> results = push.call();
for (PushResult result : results) {
try (ObjectReader reader = db.newObjectReader()) {