Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New parameter for additionalMergeOptions #157

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
support additionalMergeOptions e.g. to specify -Xtheirs
  • Loading branch information
Martin Drößler committed Feb 14, 2019
commit 38319385c2953bb8ae07393794599e9564ea4eba
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ public abstract class AbstractGitFlowMojo extends AbstractMojo {
@Parameter(defaultValue = "${settings}", readonly = true)
protected Settings settings;

@Parameter(property = "additionalMergeOptions")
protected String additionalMergeOptions;

/**
* Initializes command line executables.
*
Expand Down Expand Up @@ -638,16 +641,16 @@ protected void gitMerge(final String branchName, boolean rebase, boolean noff, b
}
if (rebase) {
getLog().info("Rebasing '" + branchName + "' branch.");
executeGitCommand("rebase", sign, branchName);
executeGitCommand("rebase", additionalMergeOptions, sign, branchName);
} else if (ffonly) {
getLog().info("Merging (--ff-only) '" + branchName + "' branch.");
executeGitCommand("merge", "--ff-only", sign, branchName);
executeGitCommand("merge", additionalMergeOptions, "--ff-only", sign, branchName);
} else if (noff) {
getLog().info("Merging (--no-ff) '" + branchName + "' branch.");
executeGitCommand("merge", "--no-ff", sign, branchName, msgParam, msg);
executeGitCommand("merge", additionalMergeOptions, "--no-ff", sign, branchName, msgParam, msg);
} else {
getLog().info("Merging '" + branchName + "' branch.");
executeGitCommand("merge", sign, branchName, msgParam, msg);
executeGitCommand("merge", additionalMergeOptions, sign, branchName, msgParam, msg);
}
}

Expand Down