Fixes Issue #68 flip logic and getCommitFromRef

This commit is contained in:
Peter Cottle 2013-03-07 21:27:28 -08:00
parent 44db45ce0d
commit e2ecfef4f4
8 changed files with 13 additions and 12 deletions

View file

@ -107,4 +107,5 @@ Or reported an issue that was successfully closed!
* Matthew Walker * Matthew Walker
* Duane Johnson * Duane Johnson
* Neil Chue Hong * Neil Chue Hong
* "Goodwine"

View file

@ -8671,7 +8671,7 @@ GitEngine.prototype.cherrypickStarter = function() {
var set = this.getUpstreamSet('HEAD'); var set = this.getUpstreamSet('HEAD');
// first resolve all the refs (as an error check) // first resolve all the refs (as an error check)
_.each(this.generalArgs, function(arg) { _.each(this.generalArgs, function(arg) {
var commit = this.resolveID(arg); var commit = this.getCommitFromRef(arg);
// and check that its not upstream // and check that its not upstream
if (set[commit.get('id')]) { if (set[commit.get('id')]) {
throw new GitError({ throw new GitError({
@ -8695,7 +8695,7 @@ GitEngine.prototype.cherrypickStarter = function() {
var afterSnapshot; var afterSnapshot;
var newCommit; var newCommit;
_.each(this.generalArgs, function(arg) { _.each(this.generalArgs, function(arg) {
var oldCommit = this.resolveID(arg); var oldCommit = this.getCommitFromRef(arg);
animationResponse.toRebaseArray.push(oldCommit); animationResponse.toRebaseArray.push(oldCommit);
newCommit = this.cherrypick(arg); newCommit = this.cherrypick(arg);
@ -15671,7 +15671,7 @@ function GitVisuals(options) {
min: 0, min: 0,
max: 1 max: 1
}; };
this.flipFraction = 0.51; this.flipFraction = 0.65;
var Main = require('../app'); var Main = require('../app');
Main.getEvents().on('refreshTree', this.refreshTree, this); Main.getEvents().on('refreshTree', this.refreshTree, this);
@ -22291,7 +22291,7 @@ GitEngine.prototype.cherrypickStarter = function() {
var set = this.getUpstreamSet('HEAD'); var set = this.getUpstreamSet('HEAD');
// first resolve all the refs (as an error check) // first resolve all the refs (as an error check)
_.each(this.generalArgs, function(arg) { _.each(this.generalArgs, function(arg) {
var commit = this.resolveID(arg); var commit = this.getCommitFromRef(arg);
// and check that its not upstream // and check that its not upstream
if (set[commit.get('id')]) { if (set[commit.get('id')]) {
throw new GitError({ throw new GitError({
@ -22315,7 +22315,7 @@ GitEngine.prototype.cherrypickStarter = function() {
var afterSnapshot; var afterSnapshot;
var newCommit; var newCommit;
_.each(this.generalArgs, function(arg) { _.each(this.generalArgs, function(arg) {
var oldCommit = this.resolveID(arg); var oldCommit = this.getCommitFromRef(arg);
animationResponse.toRebaseArray.push(oldCommit); animationResponse.toRebaseArray.push(oldCommit);
newCommit = this.cherrypick(arg); newCommit = this.cherrypick(arg);
@ -29852,7 +29852,7 @@ function GitVisuals(options) {
min: 0, min: 0,
max: 1 max: 1
}; };
this.flipFraction = 0.51; this.flipFraction = 0.65;
var Main = require('../app'); var Main = require('../app');
Main.getEvents().on('refreshTree', this.refreshTree, this); Main.getEvents().on('refreshTree', this.refreshTree, this);

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

@ -412,7 +412,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.af985bd7.js"></script> <script src="build/bundle.min.ca78b51d.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

@ -546,7 +546,7 @@ GitEngine.prototype.cherrypickStarter = function() {
var set = this.getUpstreamSet('HEAD'); var set = this.getUpstreamSet('HEAD');
// first resolve all the refs (as an error check) // first resolve all the refs (as an error check)
_.each(this.generalArgs, function(arg) { _.each(this.generalArgs, function(arg) {
var commit = this.resolveID(arg); var commit = this.getCommitFromRef(arg);
// and check that its not upstream // and check that its not upstream
if (set[commit.get('id')]) { if (set[commit.get('id')]) {
throw new GitError({ throw new GitError({
@ -570,7 +570,7 @@ GitEngine.prototype.cherrypickStarter = function() {
var afterSnapshot; var afterSnapshot;
var newCommit; var newCommit;
_.each(this.generalArgs, function(arg) { _.each(this.generalArgs, function(arg) {
var oldCommit = this.resolveID(arg); var oldCommit = this.getCommitFromRef(arg);
animationResponse.toRebaseArray.push(oldCommit); animationResponse.toRebaseArray.push(oldCommit);
newCommit = this.cherrypick(arg); newCommit = this.cherrypick(arg);

View file

@ -43,7 +43,7 @@ function GitVisuals(options) {
min: 0, min: 0,
max: 1 max: 1
}; };
this.flipFraction = 0.51; this.flipFraction = 0.65;
var Main = require('../app'); var Main = require('../app');
Main.getEvents().on('refreshTree', this.refreshTree, this); Main.getEvents().on('refreshTree', this.refreshTree, this);