mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +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
|
@ -43,6 +43,25 @@ function getMockFactory() {
|
|||
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() {
|
||||
this.init();
|
||||
};
|
||||
|
@ -55,6 +74,11 @@ HeadlessGit.prototype.init = function() {
|
|||
// is headless
|
||||
var animationFactory = getMockFactory();
|
||||
var gitVisuals = mock(GitVisuals);
|
||||
// add some stuff for origin making
|
||||
var mockVis = getMockVisualization();
|
||||
gitVisuals.getVisualization = function() {
|
||||
return mockVis;
|
||||
};
|
||||
|
||||
this.gitEngine = new GitEngine({
|
||||
collection: this.commitCollection,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue