Fix --no-ff for real usage, Pull Request #136 clowntown by me thanks @nem75

This commit is contained in:
Peter Cottle 2013-10-10 14:30:55 -07:00
parent f930bae005
commit db78bad106
6 changed files with 7 additions and 20 deletions

View file

@ -2074,12 +2074,7 @@ GitEngine.prototype.merge = function(targetSource, options) {
});
}
if (this.isUpstreamOf(currentLocation, targetSource)) {
if (options.noFF) {
throw new GitError({
msg: intl.todo('Merge aborted because no-fast-forward was specified!')
});
}
if (this.isUpstreamOf(currentLocation, targetSource) && !options.noFF) {
// just set the target of this current location to the source
this.setTargetLocation(currentLocation, this.getCommitFromRef(targetSource));
// get fresh animation to happen