diff --git a/grunt.js b/grunt.js index 34720902..173966f6 100644 --- a/grunt.js +++ b/grunt.js @@ -83,7 +83,7 @@ module.exports = function(grunt) { // aliases: ['jquery:jquery-browserify'], entries: ['src/*.js'], //prepend: [''], - append: [], + append: [] /*hook: function (bundle) { // Do something with bundle }*/ diff --git a/src/animationFactory.js b/src/animationFactory.js index c3cf4e74..c9aa8884 100644 --- a/src/animationFactory.js +++ b/src/animationFactory.js @@ -14,7 +14,7 @@ var GRAPHICS = require('./constants').GRAPHICS; // essentially a static class var AnimationFactory = function() { -} +}; AnimationFactory.prototype.genCommitBirthAnimation = function(animationQueue, commit, gitVisuals) { if (!animationQueue) { @@ -164,7 +164,7 @@ AnimationFactory.prototype.rebaseBirthPart = function(animationQueue, rebaseResp snapshotPart(); birthPart(); }; - + animationQueue.add(new Animation({ closure: animation, duration: GRAPHICS.defaultAnimationTime * 1.5 diff --git a/src/async.js b/src/async.js index 9451371d..f8d6747a 100644 --- a/src/async.js +++ b/src/async.js @@ -77,7 +77,7 @@ var AnimationQueue = Backbone.Model.extend({ setTimeout(_.bind(function() { this.next(); }, this), duration); - }, + } }); exports.Animation = Animation; diff --git a/src/collections.js b/src/collections.js index d3b9838a..dc557b2c 100644 --- a/src/collections.js +++ b/src/collections.js @@ -11,7 +11,7 @@ var CommitCollection = Backbone.Collection.extend({ }); var CommandCollection = Backbone.Collection.extend({ - model: Command, + model: Command }); var BranchCollection = Backbone.Collection.extend({ @@ -25,7 +25,7 @@ var CommandEntryCollection = Backbone.Collection.extend({ var CommandBuffer = Backbone.Model.extend({ defaults: { - collection: null, + collection: null }, initialize: function(options) { @@ -92,7 +92,7 @@ var CommandBuffer = Backbone.Model.extend({ } this.popAndProcess(); - }, + } }); exports.CommitCollection = CommitCollection; diff --git a/src/commandModel.js b/src/commandModel.js index 9a863cea..04ff8716 100644 --- a/src/commandModel.js +++ b/src/commandModel.js @@ -162,7 +162,7 @@ var Command = Backbone.Model.extend({ _.escape('\t git []'), '
', 'Supported commands:', - '
', + '
' ]; var commands = OptionParser.prototype.getMasterOptionMap(); @@ -182,12 +182,16 @@ var Command = Backbone.Model.extend({ }); }], [/^refresh$/, function() { + var events = require('./main').getEvents(); + events.trigger('refreshTree'); throw new CommandResult({ msg: "Refreshing tree..." }); }], [/^rollup (\d+)$/, function(bits) { + var events = require('./main').getEvents(); + // go roll up these commands by joining them with semicolons events.trigger('rollupCommands', bits[1]); throw new CommandResult({ @@ -261,7 +265,7 @@ var Command = Backbone.Model.extend({ // steal these away so we can be completely JSON this.set('generalArgs', optionParser.generalArgs); this.set('supportedMap', optionParser.supportedMap); - }, + } }); /** @@ -308,7 +312,7 @@ OptionParser.prototype.getMasterOptionMap = function() { }, reset: { '--hard': false, - '--soft': false, // this will raise an error but we catch it in gitEngine + '--soft': false // this will raise an error but we catch it in gitEngine }, merge: {}, rebase: { diff --git a/src/commandViews.js b/src/commandViews.js index 703eabf9..f21c9d50 100644 --- a/src/commandViews.js +++ b/src/commandViews.js @@ -72,7 +72,7 @@ var CommandPromptView = Backbone.View.extend({ }, hideCursor: function() { - this.toggleCursor(false); + this.toggleCursor(false); }, showCursor: function() { @@ -85,7 +85,7 @@ var CommandPromptView = Backbone.View.extend({ onKey: function(e) { var el = e.srcElement; - this.updatePrompt(el) + this.updatePrompt(el); }, onKeyUp: function(e) { @@ -120,7 +120,7 @@ var CommandPromptView = Backbone.View.extend({ .replace(/= this.commands.length || this.index < 0) { @@ -285,10 +285,10 @@ var CommandView = Backbone.View.extend({ // with jquery rather than brutally delete a html of HTML var changes = changeEvent.changes; var changeKeys = _.keys(changes); - if (_.difference(changeKeys, ['status']) == 0) { + if (_.difference(changeKeys, ['status']) === 0) { this.updateStatus(); - } else if (_.difference(changeKeys, ['error']) == 0) { - // the above will + } else if (_.difference(changeKeys, ['error']) === 0) { + // the above will this.render(); } else { this.render(); diff --git a/src/constants.js b/src/constants.js index 20e230bf..fcc2a18b 100644 --- a/src/constants.js +++ b/src/constants.js @@ -2,7 +2,7 @@ * Constants....!!! */ var TIME = { - betweenCommandsDelay: 400, + betweenCommandsDelay: 400 }; // useful for locks, etc @@ -37,7 +37,7 @@ var GRAPHICS = { defaultNodeStrokeWidth: 2, defaultNodeStroke: '#FFF', - orphanNodeFill: 'hsb(0.5,0.8,0.7)', + orphanNodeFill: 'hsb(0.5,0.8,0.7)' }; exports.GLOBAL = GLOBAL; diff --git a/src/git.js b/src/git.js index 3cc651dc..e1769e6b 100644 --- a/src/git.js +++ b/src/git.js @@ -1214,6 +1214,7 @@ GitEngine.prototype.checkout = function(idOrTarget) { }; GitEngine.prototype.branchStarter = function() { + var args = null; // handle deletion first if (this.commandOptions['-d'] || this.commandOptions['-D']) { var names = this.commandOptions['-d'] || this.commandOptions['-D']; @@ -1226,14 +1227,14 @@ GitEngine.prototype.branchStarter = function() { } if (this.commandOptions['--contains']) { - var args = this.commandOptions['--contains']; + args = this.commandOptions['--contains']; this.validateArgBounds(args, 1, 1, '--contains'); this.printBranchesWithout(args[0]); return; } if (this.commandOptions['-f']) { - var args = this.commandOptions['-f']; + args = this.commandOptions['-f']; this.twoArgsImpliedHead(args, '-f'); // we want to force a branch somewhere