mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
[Origin] git pull done wow that was easy
This commit is contained in:
parent
a24f62420d
commit
29415cb525
7 changed files with 76 additions and 27 deletions
|
@ -7852,7 +7852,19 @@ GitEngine.prototype.fetch = function() {
|
||||||
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.originInitStarter = function() {
|
GitEngine.prototype.pullStarter = function() {
|
||||||
|
this.acceptNoGeneralArgs();
|
||||||
|
// no matter what fetch
|
||||||
|
this.fetch();
|
||||||
|
// then either rebase or merge
|
||||||
|
if (this.commandOptions['--rebase']) {
|
||||||
|
this.rebaseFinisher('o/master', 'master');
|
||||||
|
} else {
|
||||||
|
this.merge('o/master');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GitEngine.prototype.cloneStarter = function() {
|
||||||
this.acceptNoGeneralArgs();
|
this.acceptNoGeneralArgs();
|
||||||
this.makeOrigin(this.printTree(this.exportTreeForBranch('master')));
|
this.makeOrigin(this.printTree(this.exportTreeForBranch('master')));
|
||||||
};
|
};
|
||||||
|
@ -8248,16 +8260,17 @@ GitEngine.prototype.rebaseStarter = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.twoArgsImpliedHead(this.generalArgs);
|
this.twoArgsImpliedHead(this.generalArgs);
|
||||||
|
this.rebaseFinisher(this.generalArgs[0], this.generalArgs[1]);
|
||||||
|
};
|
||||||
|
|
||||||
var response = this.rebase(this.generalArgs[0], this.generalArgs[1]);
|
GitEngine.prototype.rebaseFinisher = function(targetSource, currentLocation) {
|
||||||
|
var response = this.rebase(targetSource, currentLocation);
|
||||||
if (response === undefined) {
|
if (response === undefined) {
|
||||||
// was a fastforward or already up to date. returning now
|
// was a fastforward or already up to date. returning now
|
||||||
// will trigger the refresh animation by not adding anything to
|
// will trigger the refresh animation by not adding anything to
|
||||||
// the animation queue
|
// the animation queue
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.animationFactory.rebaseAnimation(this.animationQueue, response, this, this.gitVisuals);
|
this.animationFactory.rebaseAnimation(this.animationQueue, response, this, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13387,7 +13400,8 @@ var regexMap = {
|
||||||
'git cherry-pick': /^git +cherry-pick($|\s)/,
|
'git cherry-pick': /^git +cherry-pick($|\s)/,
|
||||||
'git fakeTeamwork': /^git +fakeTeamwork *?$/,
|
'git fakeTeamwork': /^git +fakeTeamwork *?$/,
|
||||||
'git fetch': /^git +fetch *?$/,
|
'git fetch': /^git +fetch *?$/,
|
||||||
'git originInit': /^git +originInit *?$/
|
'git pull': /^git +pull($|\s)/,
|
||||||
|
'git clone': /^git +clone *?$/
|
||||||
};
|
};
|
||||||
|
|
||||||
var parse = function(str) {
|
var parse = function(str) {
|
||||||
|
@ -13474,8 +13488,11 @@ GitOptionParser.prototype.getMasterOptionMap = function() {
|
||||||
},
|
},
|
||||||
revert: {},
|
revert: {},
|
||||||
show: {},
|
show: {},
|
||||||
originInit: {},
|
clone: {},
|
||||||
fetch: {},
|
fetch: {},
|
||||||
|
pull: {
|
||||||
|
'--rebase': false
|
||||||
|
},
|
||||||
fakeTeamwork: {}
|
fakeTeamwork: {}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -22552,7 +22569,8 @@ var regexMap = {
|
||||||
'git cherry-pick': /^git +cherry-pick($|\s)/,
|
'git cherry-pick': /^git +cherry-pick($|\s)/,
|
||||||
'git fakeTeamwork': /^git +fakeTeamwork *?$/,
|
'git fakeTeamwork': /^git +fakeTeamwork *?$/,
|
||||||
'git fetch': /^git +fetch *?$/,
|
'git fetch': /^git +fetch *?$/,
|
||||||
'git originInit': /^git +originInit *?$/
|
'git pull': /^git +pull($|\s)/,
|
||||||
|
'git clone': /^git +clone *?$/
|
||||||
};
|
};
|
||||||
|
|
||||||
var parse = function(str) {
|
var parse = function(str) {
|
||||||
|
@ -22639,8 +22657,11 @@ GitOptionParser.prototype.getMasterOptionMap = function() {
|
||||||
},
|
},
|
||||||
revert: {},
|
revert: {},
|
||||||
show: {},
|
show: {},
|
||||||
originInit: {},
|
clone: {},
|
||||||
fetch: {},
|
fetch: {},
|
||||||
|
pull: {
|
||||||
|
'--rebase': false
|
||||||
|
},
|
||||||
fakeTeamwork: {}
|
fakeTeamwork: {}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -23636,7 +23657,19 @@ GitEngine.prototype.fetch = function() {
|
||||||
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.originInitStarter = function() {
|
GitEngine.prototype.pullStarter = function() {
|
||||||
|
this.acceptNoGeneralArgs();
|
||||||
|
// no matter what fetch
|
||||||
|
this.fetch();
|
||||||
|
// then either rebase or merge
|
||||||
|
if (this.commandOptions['--rebase']) {
|
||||||
|
this.rebaseFinisher('o/master', 'master');
|
||||||
|
} else {
|
||||||
|
this.merge('o/master');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GitEngine.prototype.cloneStarter = function() {
|
||||||
this.acceptNoGeneralArgs();
|
this.acceptNoGeneralArgs();
|
||||||
this.makeOrigin(this.printTree(this.exportTreeForBranch('master')));
|
this.makeOrigin(this.printTree(this.exportTreeForBranch('master')));
|
||||||
};
|
};
|
||||||
|
@ -24032,16 +24065,17 @@ GitEngine.prototype.rebaseStarter = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.twoArgsImpliedHead(this.generalArgs);
|
this.twoArgsImpliedHead(this.generalArgs);
|
||||||
|
this.rebaseFinisher(this.generalArgs[0], this.generalArgs[1]);
|
||||||
|
};
|
||||||
|
|
||||||
var response = this.rebase(this.generalArgs[0], this.generalArgs[1]);
|
GitEngine.prototype.rebaseFinisher = function(targetSource, currentLocation) {
|
||||||
|
var response = this.rebase(targetSource, currentLocation);
|
||||||
if (response === undefined) {
|
if (response === undefined) {
|
||||||
// was a fastforward or already up to date. returning now
|
// was a fastforward or already up to date. returning now
|
||||||
// will trigger the refresh animation by not adding anything to
|
// will trigger the refresh animation by not adding anything to
|
||||||
// the animation queue
|
// the animation queue
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.animationFactory.rebaseAnimation(this.animationQueue, response, this, this.gitVisuals);
|
this.animationFactory.rebaseAnimation(this.animationQueue, response, this, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
1
build/bundle.min.4e79ad6e.js
Normal file
1
build/bundle.min.4e79ad6e.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
|
@ -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.js"></script>
|
<script src="build/bundle.min.4e79ad6e.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
|
||||||
|
|
|
@ -64,7 +64,8 @@ var regexMap = {
|
||||||
'git cherry-pick': /^git +cherry-pick($|\s)/,
|
'git cherry-pick': /^git +cherry-pick($|\s)/,
|
||||||
'git fakeTeamwork': /^git +fakeTeamwork *?$/,
|
'git fakeTeamwork': /^git +fakeTeamwork *?$/,
|
||||||
'git fetch': /^git +fetch *?$/,
|
'git fetch': /^git +fetch *?$/,
|
||||||
'git originInit': /^git +originInit *?$/
|
'git pull': /^git +pull($|\s)/,
|
||||||
|
'git clone': /^git +clone *?$/
|
||||||
};
|
};
|
||||||
|
|
||||||
var parse = function(str) {
|
var parse = function(str) {
|
||||||
|
@ -151,8 +152,11 @@ GitOptionParser.prototype.getMasterOptionMap = function() {
|
||||||
},
|
},
|
||||||
revert: {},
|
revert: {},
|
||||||
show: {},
|
show: {},
|
||||||
originInit: {},
|
clone: {},
|
||||||
fetch: {},
|
fetch: {},
|
||||||
|
pull: {
|
||||||
|
'--rebase': false
|
||||||
|
},
|
||||||
fakeTeamwork: {}
|
fakeTeamwork: {}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -799,7 +799,19 @@ GitEngine.prototype.fetch = function() {
|
||||||
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.originInitStarter = function() {
|
GitEngine.prototype.pullStarter = function() {
|
||||||
|
this.acceptNoGeneralArgs();
|
||||||
|
// no matter what fetch
|
||||||
|
this.fetch();
|
||||||
|
// then either rebase or merge
|
||||||
|
if (this.commandOptions['--rebase']) {
|
||||||
|
this.rebaseFinisher('o/master', 'master');
|
||||||
|
} else {
|
||||||
|
this.merge('o/master');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GitEngine.prototype.cloneStarter = function() {
|
||||||
this.acceptNoGeneralArgs();
|
this.acceptNoGeneralArgs();
|
||||||
this.makeOrigin(this.printTree(this.exportTreeForBranch('master')));
|
this.makeOrigin(this.printTree(this.exportTreeForBranch('master')));
|
||||||
};
|
};
|
||||||
|
@ -1195,16 +1207,17 @@ GitEngine.prototype.rebaseStarter = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.twoArgsImpliedHead(this.generalArgs);
|
this.twoArgsImpliedHead(this.generalArgs);
|
||||||
|
this.rebaseFinisher(this.generalArgs[0], this.generalArgs[1]);
|
||||||
|
};
|
||||||
|
|
||||||
var response = this.rebase(this.generalArgs[0], this.generalArgs[1]);
|
GitEngine.prototype.rebaseFinisher = function(targetSource, currentLocation) {
|
||||||
|
var response = this.rebase(targetSource, currentLocation);
|
||||||
if (response === undefined) {
|
if (response === undefined) {
|
||||||
// was a fastforward or already up to date. returning now
|
// was a fastforward or already up to date. returning now
|
||||||
// will trigger the refresh animation by not adding anything to
|
// will trigger the refresh animation by not adding anything to
|
||||||
// the animation queue
|
// the animation queue
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.animationFactory.rebaseAnimation(this.animationQueue, response, this, this.gitVisuals);
|
this.animationFactory.rebaseAnimation(this.animationQueue, response, this, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
12
todo.txt
12
todo.txt
|
@ -13,16 +13,10 @@ Big Things
|
||||||
|
|
||||||
Origin things:
|
Origin things:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
[ ] Setup branch model to include:
|
|
||||||
[-] remote branch it is tracking (points to a remote branch model)
|
|
||||||
[ ] set checkout -b branch __remoteBranch to track the remote branch
|
[ ] set checkout -b branch __remoteBranch to track the remote branch
|
||||||
|
[ ] tree comparison with origin.... sigh
|
||||||
[ ] fix branch -a and branch -r to:
|
|
||||||
-- show remote branches or all branches
|
|
||||||
|
|
||||||
[ ] prototype visual layout (background change + header? maybe...)
|
[ ] prototype visual layout (background change + header? maybe...)
|
||||||
|
[ ] git pull
|
||||||
[ ] worry about how this affects serialization and tree comparisons. We should be able to still only compare the local copy
|
|
||||||
|
|
||||||
Medium things:
|
Medium things:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -45,6 +39,8 @@ Ideas for cleaning
|
||||||
Done things:
|
Done things:
|
||||||
(I only started this on Dec 17th 2012 to get a better sense of what was done)
|
(I only started this on Dec 17th 2012 to get a better sense of what was done)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
[x] remote branch it is tracking (points to a remote branch model)
|
||||||
|
[x] fix branch -a and branch -r to: show remote branches or all branches
|
||||||
[x] fix branch -f to not allow moving remote branches?
|
[x] fix branch -f to not allow moving remote branches?
|
||||||
[x] fix checkout to: if you go to __remoteBranch, it just goes to the commit since its read-only.
|
[x] fix checkout to: if you go to __remoteBranch, it just goes to the commit since its read-only.
|
||||||
[x] is remote (custom getter)
|
[x] is remote (custom getter)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue