mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-16 01:24:25 +02:00
Fix --no-ff for real usage, Pull Request #136 clowntown by me thanks @nem75
This commit is contained in:
parent
f930bae005
commit
db78bad106
6 changed files with 7 additions and 20 deletions
|
@ -9300,12 +9300,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
|
||||
|
@ -29064,12 +29059,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
|
||||
|
|
1
build/bundle.min.3fa21ecf.js
Normal file
1
build/bundle.min.3fa21ecf.js
Normal file
File diff suppressed because one or more lines are too long
1
build/bundle.min.js
vendored
Normal file
1
build/bundle.min.js
vendored
Normal file
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:
|
||||
https://github.com/pcottle/learnGitBranching
|
||||
-->
|
||||
<script src="build/bundle.js"></script>
|
||||
<script src="build/bundle.min.3fa21ecf.js"></script>
|
||||
|
||||
<!-- 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
|
||||
|
|
|
@ -152,7 +152,7 @@ describe('Git', function() {
|
|||
it('does not fast forward on merge if specified', function() {
|
||||
expectTreeAsync(
|
||||
'git commit; go -b side HEAD~1; git commit; git merge master; go master; git merge side --no-ff',
|
||||
'{"branches":{"master":{"target":"C2","id":"master","remoteTrackingBranchID":null,"localBranchesThatTrackThis":null},"side":{"target":"C4","id":"side","remoteTrackingBranchID":null,"localBranchesThatTrackThis":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C1"],"id":"C3"},"C4":{"parents":["C2","C3"],"id":"C4"}},"HEAD":{"target":"master","id":"HEAD"}}'
|
||||
'{"branches":{"master":{"target":"C4","id":"master","remoteTrackingBranchID":null},"feature":{"target":"C3","id":"feature","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C2"],"id":"C3"},"C4":{"parents":["C1","C3"],"id":"C4"}},"HEAD":{"target":"master","id":"HEAD"}}'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue