List of usage examples for org.eclipse.jgit.api MergeCommand setFastForward
public MergeCommand setFastForward(@Nullable FastForwardMode fastForwardMode)
From source file:org.codehaus.mojo.versions.BumpMojo.java
License:Apache License
void gitMergeNFF(String c, String m) throws MojoExecutionException { try {/*from w w w .j a va2s . co m*/ MergeCommand ff = git.merge(); ff.setCommit(false); ff.setFastForward(FastForwardMode.NO_FF); ff.include(git.getRepository().getRef(m)); MergeResult f = ff.call(); if (!f.getMergeStatus().isSuccessful()) { throw new MojoExecutionException(f.getMergeStatus().toString()); } git.commit().setAll(true).setMessage(c).call(); } catch (GitAPIException e) { throw new MojoExecutionException(e.getMessage(), e); } catch (IOException e) { throw new MojoExecutionException(e.getMessage(), e); } }