[Origin] few updates

This commit is contained in:
Peter Cottle 2013-05-27 11:04:47 -07:00
parent 29415cb525
commit aba8265a00
7 changed files with 42 additions and 15 deletions

View file

@ -7853,7 +7853,13 @@ GitEngine.prototype.fetch = function() {
}; };
GitEngine.prototype.pullStarter = function() { GitEngine.prototype.pullStarter = function() {
if (!this.hasOrigin()) {
throw new GitError({
msg: intl.str('git-error-origin-required')
});
}
this.acceptNoGeneralArgs(); this.acceptNoGeneralArgs();
// no matter what fetch // no matter what fetch
this.fetch(); this.fetch();
// then either rebase or merge // then either rebase or merge
@ -7870,15 +7876,18 @@ GitEngine.prototype.cloneStarter = function() {
}; };
GitEngine.prototype.fakeTeamworkStarter = function() { GitEngine.prototype.fakeTeamworkStarter = function() {
this.acceptNoGeneralArgs();
if (!this.hasOrigin()) { if (!this.hasOrigin()) {
throw new GitError({ throw new GitError({
msg: intl.str('git-error-origin-required') msg: intl.str('git-error-origin-required')
}); });
} }
var numToMake = this.generalArgs[0] || 1;
this.validateArgBounds(this.generalArgs, 0, 1);
for (var i = 0; i < numToMake; i++) {
var id = this.getUniqueID(); var id = this.getUniqueID();
this.origin.receiveTeamwork(id, this.animationQueue); this.origin.receiveTeamwork(id, this.animationQueue);
}
}; };
GitEngine.prototype.receiveTeamwork = function(id, animationQueue) { GitEngine.prototype.receiveTeamwork = function(id, animationQueue) {
@ -13398,7 +13407,7 @@ var regexMap = {
'git show': /^git +show($|\s)/, 'git show': /^git +show($|\s)/,
'git status': /^git +status($|\s)/, 'git status': /^git +status($|\s)/,
'git cherry-pick': /^git +cherry-pick($|\s)/, 'git cherry-pick': /^git +cherry-pick($|\s)/,
'git fakeTeamwork': /^git +fakeTeamwork *?$/, 'git fakeTeamwork': /^git +fakeTeamwork($|\s)/,
'git fetch': /^git +fetch *?$/, 'git fetch': /^git +fetch *?$/,
'git pull': /^git +pull($|\s)/, 'git pull': /^git +pull($|\s)/,
'git clone': /^git +clone *?$/ 'git clone': /^git +clone *?$/
@ -22567,7 +22576,7 @@ var regexMap = {
'git show': /^git +show($|\s)/, 'git show': /^git +show($|\s)/,
'git status': /^git +status($|\s)/, 'git status': /^git +status($|\s)/,
'git cherry-pick': /^git +cherry-pick($|\s)/, 'git cherry-pick': /^git +cherry-pick($|\s)/,
'git fakeTeamwork': /^git +fakeTeamwork *?$/, 'git fakeTeamwork': /^git +fakeTeamwork($|\s)/,
'git fetch': /^git +fetch *?$/, 'git fetch': /^git +fetch *?$/,
'git pull': /^git +pull($|\s)/, 'git pull': /^git +pull($|\s)/,
'git clone': /^git +clone *?$/ 'git clone': /^git +clone *?$/
@ -23658,7 +23667,13 @@ GitEngine.prototype.fetch = function() {
}; };
GitEngine.prototype.pullStarter = function() { GitEngine.prototype.pullStarter = function() {
if (!this.hasOrigin()) {
throw new GitError({
msg: intl.str('git-error-origin-required')
});
}
this.acceptNoGeneralArgs(); this.acceptNoGeneralArgs();
// no matter what fetch // no matter what fetch
this.fetch(); this.fetch();
// then either rebase or merge // then either rebase or merge
@ -23675,15 +23690,18 @@ GitEngine.prototype.cloneStarter = function() {
}; };
GitEngine.prototype.fakeTeamworkStarter = function() { GitEngine.prototype.fakeTeamworkStarter = function() {
this.acceptNoGeneralArgs();
if (!this.hasOrigin()) { if (!this.hasOrigin()) {
throw new GitError({ throw new GitError({
msg: intl.str('git-error-origin-required') msg: intl.str('git-error-origin-required')
}); });
} }
var numToMake = this.generalArgs[0] || 1;
this.validateArgBounds(this.generalArgs, 0, 1);
for (var i = 0; i < numToMake; i++) {
var id = this.getUniqueID(); var id = this.getUniqueID();
this.origin.receiveTeamwork(id, this.animationQueue); this.origin.receiveTeamwork(id, this.animationQueue);
}
}; };
GitEngine.prototype.receiveTeamwork = function(id, animationQueue) { GitEngine.prototype.receiveTeamwork = function(id, animationQueue) {

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

File diff suppressed because one or more lines are too long

View file

@ -426,7 +426,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.4e79ad6e.js"></script> <script src="build/bundle.min.67f82a44.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

View file

@ -62,7 +62,7 @@ var regexMap = {
'git show': /^git +show($|\s)/, 'git show': /^git +show($|\s)/,
'git status': /^git +status($|\s)/, 'git status': /^git +status($|\s)/,
'git cherry-pick': /^git +cherry-pick($|\s)/, 'git cherry-pick': /^git +cherry-pick($|\s)/,
'git fakeTeamwork': /^git +fakeTeamwork *?$/, 'git fakeTeamwork': /^git +fakeTeamwork($|\s)/,
'git fetch': /^git +fetch *?$/, 'git fetch': /^git +fetch *?$/,
'git pull': /^git +pull($|\s)/, 'git pull': /^git +pull($|\s)/,
'git clone': /^git +clone *?$/ 'git clone': /^git +clone *?$/

View file

@ -800,7 +800,13 @@ GitEngine.prototype.fetch = function() {
}; };
GitEngine.prototype.pullStarter = function() { GitEngine.prototype.pullStarter = function() {
if (!this.hasOrigin()) {
throw new GitError({
msg: intl.str('git-error-origin-required')
});
}
this.acceptNoGeneralArgs(); this.acceptNoGeneralArgs();
// no matter what fetch // no matter what fetch
this.fetch(); this.fetch();
// then either rebase or merge // then either rebase or merge
@ -817,15 +823,18 @@ GitEngine.prototype.cloneStarter = function() {
}; };
GitEngine.prototype.fakeTeamworkStarter = function() { GitEngine.prototype.fakeTeamworkStarter = function() {
this.acceptNoGeneralArgs();
if (!this.hasOrigin()) { if (!this.hasOrigin()) {
throw new GitError({ throw new GitError({
msg: intl.str('git-error-origin-required') msg: intl.str('git-error-origin-required')
}); });
} }
var numToMake = this.generalArgs[0] || 1;
this.validateArgBounds(this.generalArgs, 0, 1);
for (var i = 0; i < numToMake; i++) {
var id = this.getUniqueID(); var id = this.getUniqueID();
this.origin.receiveTeamwork(id, this.animationQueue); this.origin.receiveTeamwork(id, this.animationQueue);
}
}; };
GitEngine.prototype.receiveTeamwork = function(id, animationQueue) { GitEngine.prototype.receiveTeamwork = function(id, animationQueue) {