diff options
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties | 1 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index d801456198..574981d385 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -298,6 +298,7 @@ usage_mergeNoFf=Create a merge commit even when the merge resolves as a fast-for 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_message=Set the commit message to be used for the merge commit (in case one is created). usage_moveRenameABranch=move/rename a branch usage_nameStatus=show only name and status of files usage_noCheckoutAfterClone=no checkout of HEAD is performed after the clone is complete 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(); |