mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 00:18:56 +02:00
YES AWESOME got make origin working with headless somehow in crazy
This commit is contained in:
parent
c0e395ad35
commit
0c95e975ec
2 changed files with 74 additions and 2 deletions
|
@ -16487,6 +16487,25 @@ function getMockFactory() {
|
||||||
return mockFactory;
|
return mockFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getMockVisualization() {
|
||||||
|
return {
|
||||||
|
makeOrigin: function(options) {
|
||||||
|
var localRepo = options.localRepo;
|
||||||
|
var treeString = options.treeString;
|
||||||
|
|
||||||
|
var headless = new HeadlessGit();
|
||||||
|
return {
|
||||||
|
customEvents: {
|
||||||
|
on: function(key, cb, context) {
|
||||||
|
cb.apply(context, []);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gitEngine: headless.gitEngine
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
var HeadlessGit = function() {
|
var HeadlessGit = function() {
|
||||||
this.init();
|
this.init();
|
||||||
};
|
};
|
||||||
|
@ -16499,6 +16518,11 @@ HeadlessGit.prototype.init = function() {
|
||||||
// is headless
|
// is headless
|
||||||
var animationFactory = getMockFactory();
|
var animationFactory = getMockFactory();
|
||||||
var gitVisuals = mock(GitVisuals);
|
var gitVisuals = mock(GitVisuals);
|
||||||
|
// add some stuff for origin making
|
||||||
|
var mockVis = getMockVisualization();
|
||||||
|
gitVisuals.getVisualization = function() {
|
||||||
|
return mockVis;
|
||||||
|
};
|
||||||
|
|
||||||
this.gitEngine = new GitEngine({
|
this.gitEngine = new GitEngine({
|
||||||
collection: this.commitCollection,
|
collection: this.commitCollection,
|
||||||
|
@ -23061,7 +23085,7 @@ require.define("/src/levels/remote/fetch.js",function(require,module,exports,__d
|
||||||
"solutionCommand": "git fetch",
|
"solutionCommand": "git fetch",
|
||||||
"startTree": "{\"branches\":{\"master\":{\"target\":\"C2\",\"id\":\"master\"},\"bugFix\":{\"target\":\"C3\",\"id\":\"bugFix\"},\"o/master\":{\"target\":\"C2\",\"id\":\"o/master\"},\"o/bugFix\":{\"target\":\"C3\",\"id\":\"o/bugFix\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C1\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"bugFix\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C5\",\"id\":\"master\"},\"bugFix\":{\"target\":\"C7\",\"id\":\"bugFix\"}},\"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\"],\"id\":\"C4\"},\"C5\":{\"parents\":[\"C4\"],\"id\":\"C5\"},\"C6\":{\"parents\":[\"C3\"],\"id\":\"C6\"},\"C7\":{\"parents\":[\"C6\"],\"id\":\"C7\"}},\"HEAD\":{\"target\":\"bugFix\",\"id\":\"HEAD\"}}}",
|
"startTree": "{\"branches\":{\"master\":{\"target\":\"C2\",\"id\":\"master\"},\"bugFix\":{\"target\":\"C3\",\"id\":\"bugFix\"},\"o/master\":{\"target\":\"C2\",\"id\":\"o/master\"},\"o/bugFix\":{\"target\":\"C3\",\"id\":\"o/bugFix\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C1\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"bugFix\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C5\",\"id\":\"master\"},\"bugFix\":{\"target\":\"C7\",\"id\":\"bugFix\"}},\"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\"],\"id\":\"C4\"},\"C5\":{\"parents\":[\"C4\"],\"id\":\"C5\"},\"C6\":{\"parents\":[\"C3\"],\"id\":\"C6\"},\"C7\":{\"parents\":[\"C6\"],\"id\":\"C7\"}},\"HEAD\":{\"target\":\"bugFix\",\"id\":\"HEAD\"}}}",
|
||||||
"name": {
|
"name": {
|
||||||
"en_US": "fetch"
|
"en_US": "Git Fetchin'"
|
||||||
},
|
},
|
||||||
"hint": {
|
"hint": {
|
||||||
"en_US": "just run git fetch!"
|
"en_US": "just run git fetch!"
|
||||||
|
@ -25839,6 +25863,25 @@ function getMockFactory() {
|
||||||
return mockFactory;
|
return mockFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getMockVisualization() {
|
||||||
|
return {
|
||||||
|
makeOrigin: function(options) {
|
||||||
|
var localRepo = options.localRepo;
|
||||||
|
var treeString = options.treeString;
|
||||||
|
|
||||||
|
var headless = new HeadlessGit();
|
||||||
|
return {
|
||||||
|
customEvents: {
|
||||||
|
on: function(key, cb, context) {
|
||||||
|
cb.apply(context, []);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gitEngine: headless.gitEngine
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
var HeadlessGit = function() {
|
var HeadlessGit = function() {
|
||||||
this.init();
|
this.init();
|
||||||
};
|
};
|
||||||
|
@ -25851,6 +25894,11 @@ HeadlessGit.prototype.init = function() {
|
||||||
// is headless
|
// is headless
|
||||||
var animationFactory = getMockFactory();
|
var animationFactory = getMockFactory();
|
||||||
var gitVisuals = mock(GitVisuals);
|
var gitVisuals = mock(GitVisuals);
|
||||||
|
// add some stuff for origin making
|
||||||
|
var mockVis = getMockVisualization();
|
||||||
|
gitVisuals.getVisualization = function() {
|
||||||
|
return mockVis;
|
||||||
|
};
|
||||||
|
|
||||||
this.gitEngine = new GitEngine({
|
this.gitEngine = new GitEngine({
|
||||||
collection: this.commitCollection,
|
collection: this.commitCollection,
|
||||||
|
@ -41770,7 +41818,7 @@ require.define("/src/levels/remote/fetch.js",function(require,module,exports,__d
|
||||||
"solutionCommand": "git fetch",
|
"solutionCommand": "git fetch",
|
||||||
"startTree": "{\"branches\":{\"master\":{\"target\":\"C2\",\"id\":\"master\"},\"bugFix\":{\"target\":\"C3\",\"id\":\"bugFix\"},\"o/master\":{\"target\":\"C2\",\"id\":\"o/master\"},\"o/bugFix\":{\"target\":\"C3\",\"id\":\"o/bugFix\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C1\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"bugFix\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C5\",\"id\":\"master\"},\"bugFix\":{\"target\":\"C7\",\"id\":\"bugFix\"}},\"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\"],\"id\":\"C4\"},\"C5\":{\"parents\":[\"C4\"],\"id\":\"C5\"},\"C6\":{\"parents\":[\"C3\"],\"id\":\"C6\"},\"C7\":{\"parents\":[\"C6\"],\"id\":\"C7\"}},\"HEAD\":{\"target\":\"bugFix\",\"id\":\"HEAD\"}}}",
|
"startTree": "{\"branches\":{\"master\":{\"target\":\"C2\",\"id\":\"master\"},\"bugFix\":{\"target\":\"C3\",\"id\":\"bugFix\"},\"o/master\":{\"target\":\"C2\",\"id\":\"o/master\"},\"o/bugFix\":{\"target\":\"C3\",\"id\":\"o/bugFix\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C1\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"bugFix\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C5\",\"id\":\"master\"},\"bugFix\":{\"target\":\"C7\",\"id\":\"bugFix\"}},\"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\"],\"id\":\"C4\"},\"C5\":{\"parents\":[\"C4\"],\"id\":\"C5\"},\"C6\":{\"parents\":[\"C3\"],\"id\":\"C6\"},\"C7\":{\"parents\":[\"C6\"],\"id\":\"C7\"}},\"HEAD\":{\"target\":\"bugFix\",\"id\":\"HEAD\"}}}",
|
||||||
"name": {
|
"name": {
|
||||||
"en_US": "fetch"
|
"en_US": "Git Fetchin'"
|
||||||
},
|
},
|
||||||
"hint": {
|
"hint": {
|
||||||
"en_US": "just run git fetch!"
|
"en_US": "just run git fetch!"
|
||||||
|
|
|
@ -43,6 +43,25 @@ function getMockFactory() {
|
||||||
return mockFactory;
|
return mockFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getMockVisualization() {
|
||||||
|
return {
|
||||||
|
makeOrigin: function(options) {
|
||||||
|
var localRepo = options.localRepo;
|
||||||
|
var treeString = options.treeString;
|
||||||
|
|
||||||
|
var headless = new HeadlessGit();
|
||||||
|
return {
|
||||||
|
customEvents: {
|
||||||
|
on: function(key, cb, context) {
|
||||||
|
cb.apply(context, []);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gitEngine: headless.gitEngine
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
var HeadlessGit = function() {
|
var HeadlessGit = function() {
|
||||||
this.init();
|
this.init();
|
||||||
};
|
};
|
||||||
|
@ -55,6 +74,11 @@ HeadlessGit.prototype.init = function() {
|
||||||
// is headless
|
// is headless
|
||||||
var animationFactory = getMockFactory();
|
var animationFactory = getMockFactory();
|
||||||
var gitVisuals = mock(GitVisuals);
|
var gitVisuals = mock(GitVisuals);
|
||||||
|
// add some stuff for origin making
|
||||||
|
var mockVis = getMockVisualization();
|
||||||
|
gitVisuals.getVisualization = function() {
|
||||||
|
return mockVis;
|
||||||
|
};
|
||||||
|
|
||||||
this.gitEngine = new GitEngine({
|
this.gitEngine = new GitEngine({
|
||||||
collection: this.commitCollection,
|
collection: this.commitCollection,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue