aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org
diff options
context:
space:
mode:
authorAxel Richard <axel.richard@obeo.fr>2014-08-29 14:37:09 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2014-08-30 01:17:24 +0200
commit46f3007b52a5d12c5a973957128ac38680b20ab8 (patch)
treec51edac33977b1885f310945a6bba8e8220abdea /org.eclipse.jgit.pgm/src/org
parent7b7d033ee1fdd8e81ae2ad7dc9e1ae12cbd9ddfa (diff)
downloadjgit-46f3007b52a5d12c5a973957128ac38680b20ab8.tar.gz
jgit-46f3007b52a5d12c5a973957128ac38680b20ab8.zip
Handle -m option for Merge command
Set the commit message to be used for the merge commit (in case one is created) Bug: 442886 Change-Id: Ie5ecc13822faa366f00b3daa07f74c8441cae195 Signed-off-by: Axel Richard <axel.richard@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java9
1 files changed, 8 insertions, 1 deletions
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 b3ff527ebc..93c4388dbc 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
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, Christian Halstrick <christian.halstrick@sap.com>
+ * Copyright (C) 2011, 2014 Christian Halstrick <christian.halstrick@sap.com>
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
@@ -98,6 +98,9 @@ class Merge extends TextBuiltin {
ff = FastForwardMode.FF_ONLY;
}
+ @Option(name = "-m", usage = "usage_message")
+ private String message;
+
@Override
protected void run() throws Exception {
if (squash && ff == FastForwardMode.NO_FF)
@@ -125,6 +128,10 @@ class Merge extends TextBuiltin {
mergeCmd.include(srcRef);
else
mergeCmd.include(src);
+
+ if (message != null)
+ mergeCmd.setMessage(message);
+
MergeResult result;
try {
result = mergeCmd.call();