mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-25 13:14:30 +02:00
rebuild for Pull Request #136
This commit is contained in:
parent
68a58102cb
commit
eb3c8f031a
5 changed files with 33 additions and 7 deletions
|
@ -9231,7 +9231,8 @@ GitEngine.prototype.mergeCheck = function(targetSource, currentLocation) {
|
||||||
return this.isUpstreamOf(targetSource, currentLocation) || sameCommit;
|
return this.isUpstreamOf(targetSource, currentLocation) || sameCommit;
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.merge = function(targetSource) {
|
GitEngine.prototype.merge = function(targetSource, options) {
|
||||||
|
options = options || {};
|
||||||
var currentLocation = 'HEAD';
|
var currentLocation = 'HEAD';
|
||||||
|
|
||||||
// first some conditions
|
// first some conditions
|
||||||
|
@ -9242,6 +9243,11 @@ GitEngine.prototype.merge = function(targetSource) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isUpstreamOf(currentLocation, targetSource)) {
|
if (this.isUpstreamOf(currentLocation, targetSource)) {
|
||||||
|
if (options.noFF) {
|
||||||
|
throw new GitError({
|
||||||
|
msg: intl.todo('Merge aborted because no-fast-forward was specified!')
|
||||||
|
});
|
||||||
|
}
|
||||||
// just set the target of this current location to the source
|
// just set the target of this current location to the source
|
||||||
this.setTargetLocation(currentLocation, this.getCommitFromRef(targetSource));
|
this.setTargetLocation(currentLocation, this.getCommitFromRef(targetSource));
|
||||||
// get fresh animation to happen
|
// get fresh animation to happen
|
||||||
|
@ -11147,11 +11153,18 @@ var commandConfig = {
|
||||||
|
|
||||||
merge: {
|
merge: {
|
||||||
regex: /^git +merge($|\s)/,
|
regex: /^git +merge($|\s)/,
|
||||||
|
options: [
|
||||||
|
'--no-ff'
|
||||||
|
],
|
||||||
execute: function(engine, command) {
|
execute: function(engine, command) {
|
||||||
|
var commandOptions = command.getOptionsMap();
|
||||||
var generalArgs = command.getGeneralArgs();
|
var generalArgs = command.getGeneralArgs();
|
||||||
command.validateArgBounds(generalArgs, 1, 1);
|
command.validateArgBounds(generalArgs, 1, 1);
|
||||||
|
|
||||||
var newCommit = engine.merge(generalArgs[0]);
|
var newCommit = engine.merge(
|
||||||
|
generalArgs[0],
|
||||||
|
{ noFF: !!commandOptions['--no-ff'] }
|
||||||
|
);
|
||||||
|
|
||||||
if (newCommit === undefined) {
|
if (newCommit === undefined) {
|
||||||
// its just a fast forwrard
|
// its just a fast forwrard
|
||||||
|
@ -26433,11 +26446,18 @@ var commandConfig = {
|
||||||
|
|
||||||
merge: {
|
merge: {
|
||||||
regex: /^git +merge($|\s)/,
|
regex: /^git +merge($|\s)/,
|
||||||
|
options: [
|
||||||
|
'--no-ff'
|
||||||
|
],
|
||||||
execute: function(engine, command) {
|
execute: function(engine, command) {
|
||||||
|
var commandOptions = command.getOptionsMap();
|
||||||
var generalArgs = command.getGeneralArgs();
|
var generalArgs = command.getGeneralArgs();
|
||||||
command.validateArgBounds(generalArgs, 1, 1);
|
command.validateArgBounds(generalArgs, 1, 1);
|
||||||
|
|
||||||
var newCommit = engine.merge(generalArgs[0]);
|
var newCommit = engine.merge(
|
||||||
|
generalArgs[0],
|
||||||
|
{ noFF: !!commandOptions['--no-ff'] }
|
||||||
|
);
|
||||||
|
|
||||||
if (newCommit === undefined) {
|
if (newCommit === undefined) {
|
||||||
// its just a fast forwrard
|
// its just a fast forwrard
|
||||||
|
@ -28882,7 +28902,8 @@ GitEngine.prototype.mergeCheck = function(targetSource, currentLocation) {
|
||||||
return this.isUpstreamOf(targetSource, currentLocation) || sameCommit;
|
return this.isUpstreamOf(targetSource, currentLocation) || sameCommit;
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.merge = function(targetSource) {
|
GitEngine.prototype.merge = function(targetSource, options) {
|
||||||
|
options = options || {};
|
||||||
var currentLocation = 'HEAD';
|
var currentLocation = 'HEAD';
|
||||||
|
|
||||||
// first some conditions
|
// first some conditions
|
||||||
|
@ -28893,6 +28914,11 @@ GitEngine.prototype.merge = function(targetSource) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isUpstreamOf(currentLocation, targetSource)) {
|
if (this.isUpstreamOf(currentLocation, targetSource)) {
|
||||||
|
if (options.noFF) {
|
||||||
|
throw new GitError({
|
||||||
|
msg: intl.todo('Merge aborted because no-fast-forward was specified!')
|
||||||
|
});
|
||||||
|
}
|
||||||
// just set the target of this current location to the source
|
// just set the target of this current location to the source
|
||||||
this.setTargetLocation(currentLocation, this.getCommitFromRef(targetSource));
|
this.setTargetLocation(currentLocation, this.getCommitFromRef(targetSource));
|
||||||
// get fresh animation to happen
|
// get fresh animation to happen
|
||||||
|
|
1
build/bundle.min.5f0940b6.js
Normal file
1
build/bundle.min.5f0940b6.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
build/bundle.min.js
vendored
2
build/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -445,7 +445,7 @@
|
||||||
For a much easier time perusing the source, see the individual files at:
|
For a much easier time perusing the source, see the individual files at:
|
||||||
https://github.com/pcottle/learnGitBranching
|
https://github.com/pcottle/learnGitBranching
|
||||||
-->
|
-->
|
||||||
<script src="build/bundle.min.e645a149.js"></script>
|
<script src="build/bundle.min.5f0940b6.js"></script>
|
||||||
|
|
||||||
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
|
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
|
||||||
The downside? No raw logs to parse for analytics, so I have to include
|
The downside? No raw logs to parse for analytics, so I have to include
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue