no lint errors

This commit is contained in:
Peter Cottle 2012-12-13 19:00:33 -08:00
parent 48dd558de1
commit 5522d13f5f
8 changed files with 26 additions and 21 deletions

View file

@ -83,7 +83,7 @@ module.exports = function(grunt) {
// aliases: ['jquery:jquery-browserify'], // aliases: ['jquery:jquery-browserify'],
entries: ['src/*.js'], entries: ['src/*.js'],
//prepend: ['<banner:meta.banner>'], //prepend: ['<banner:meta.banner>'],
append: [], append: []
/*hook: function (bundle) { /*hook: function (bundle) {
// Do something with bundle // Do something with bundle
}*/ }*/

View file

@ -14,7 +14,7 @@ var GRAPHICS = require('./constants').GRAPHICS;
// essentially a static class // essentially a static class
var AnimationFactory = function() { var AnimationFactory = function() {
} };
AnimationFactory.prototype.genCommitBirthAnimation = function(animationQueue, commit, gitVisuals) { AnimationFactory.prototype.genCommitBirthAnimation = function(animationQueue, commit, gitVisuals) {
if (!animationQueue) { if (!animationQueue) {

View file

@ -77,7 +77,7 @@ var AnimationQueue = Backbone.Model.extend({
setTimeout(_.bind(function() { setTimeout(_.bind(function() {
this.next(); this.next();
}, this), duration); }, this), duration);
}, }
}); });
exports.Animation = Animation; exports.Animation = Animation;

View file

@ -11,7 +11,7 @@ var CommitCollection = Backbone.Collection.extend({
}); });
var CommandCollection = Backbone.Collection.extend({ var CommandCollection = Backbone.Collection.extend({
model: Command, model: Command
}); });
var BranchCollection = Backbone.Collection.extend({ var BranchCollection = Backbone.Collection.extend({
@ -25,7 +25,7 @@ var CommandEntryCollection = Backbone.Collection.extend({
var CommandBuffer = Backbone.Model.extend({ var CommandBuffer = Backbone.Model.extend({
defaults: { defaults: {
collection: null, collection: null
}, },
initialize: function(options) { initialize: function(options) {
@ -92,7 +92,7 @@ var CommandBuffer = Backbone.Model.extend({
} }
this.popAndProcess(); this.popAndProcess();
}, }
}); });
exports.CommitCollection = CommitCollection; exports.CommitCollection = CommitCollection;

View file

@ -162,7 +162,7 @@ var Command = Backbone.Model.extend({
_.escape('\t git <command> [<args>]'), _.escape('\t git <command> [<args>]'),
'<br/>', '<br/>',
'Supported commands:', 'Supported commands:',
'<br/>', '<br/>'
]; ];
var commands = OptionParser.prototype.getMasterOptionMap(); var commands = OptionParser.prototype.getMasterOptionMap();
@ -182,12 +182,16 @@ var Command = Backbone.Model.extend({
}); });
}], }],
[/^refresh$/, function() { [/^refresh$/, function() {
var events = require('./main').getEvents();
events.trigger('refreshTree'); events.trigger('refreshTree');
throw new CommandResult({ throw new CommandResult({
msg: "Refreshing tree..." msg: "Refreshing tree..."
}); });
}], }],
[/^rollup (\d+)$/, function(bits) { [/^rollup (\d+)$/, function(bits) {
var events = require('./main').getEvents();
// go roll up these commands by joining them with semicolons // go roll up these commands by joining them with semicolons
events.trigger('rollupCommands', bits[1]); events.trigger('rollupCommands', bits[1]);
throw new CommandResult({ throw new CommandResult({
@ -261,7 +265,7 @@ var Command = Backbone.Model.extend({
// steal these away so we can be completely JSON // steal these away so we can be completely JSON
this.set('generalArgs', optionParser.generalArgs); this.set('generalArgs', optionParser.generalArgs);
this.set('supportedMap', optionParser.supportedMap); this.set('supportedMap', optionParser.supportedMap);
}, }
}); });
/** /**
@ -308,7 +312,7 @@ OptionParser.prototype.getMasterOptionMap = function() {
}, },
reset: { reset: {
'--hard': false, '--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: {}, merge: {},
rebase: { rebase: {

View file

@ -85,7 +85,7 @@ var CommandPromptView = Backbone.View.extend({
onKey: function(e) { onKey: function(e) {
var el = e.srcElement; var el = e.srcElement;
this.updatePrompt(el) this.updatePrompt(el);
}, },
onKeyUp: function(e) { onKeyUp: function(e) {
@ -120,7 +120,7 @@ var CommandPromptView = Backbone.View.extend({
.replace(/</g,'&lt;') .replace(/</g,'&lt;')
.replace(/</g,'&lt;') .replace(/</g,'&lt;')
.replace(/ /g,'&nbsp;') .replace(/ /g,'&nbsp;')
.replace(/\n/g,'') .replace(/\n/g,'');
}, },
updatePrompt: function(el) { updatePrompt: function(el) {
@ -285,9 +285,9 @@ var CommandView = Backbone.View.extend({
// with jquery rather than brutally delete a html of HTML // with jquery rather than brutally delete a html of HTML
var changes = changeEvent.changes; var changes = changeEvent.changes;
var changeKeys = _.keys(changes); var changeKeys = _.keys(changes);
if (_.difference(changeKeys, ['status']) == 0) { if (_.difference(changeKeys, ['status']) === 0) {
this.updateStatus(); this.updateStatus();
} else if (_.difference(changeKeys, ['error']) == 0) { } else if (_.difference(changeKeys, ['error']) === 0) {
// the above will // the above will
this.render(); this.render();
} else { } else {

View file

@ -2,7 +2,7 @@
* Constants....!!! * Constants....!!!
*/ */
var TIME = { var TIME = {
betweenCommandsDelay: 400, betweenCommandsDelay: 400
}; };
// useful for locks, etc // useful for locks, etc
@ -37,7 +37,7 @@ var GRAPHICS = {
defaultNodeStrokeWidth: 2, defaultNodeStrokeWidth: 2,
defaultNodeStroke: '#FFF', defaultNodeStroke: '#FFF',
orphanNodeFill: 'hsb(0.5,0.8,0.7)', orphanNodeFill: 'hsb(0.5,0.8,0.7)'
}; };
exports.GLOBAL = GLOBAL; exports.GLOBAL = GLOBAL;

View file

@ -1214,6 +1214,7 @@ GitEngine.prototype.checkout = function(idOrTarget) {
}; };
GitEngine.prototype.branchStarter = function() { GitEngine.prototype.branchStarter = function() {
var args = null;
// handle deletion first // handle deletion first
if (this.commandOptions['-d'] || this.commandOptions['-D']) { if (this.commandOptions['-d'] || this.commandOptions['-D']) {
var names = 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']) { if (this.commandOptions['--contains']) {
var args = this.commandOptions['--contains']; args = this.commandOptions['--contains'];
this.validateArgBounds(args, 1, 1, '--contains'); this.validateArgBounds(args, 1, 1, '--contains');
this.printBranchesWithout(args[0]); this.printBranchesWithout(args[0]);
return; return;
} }
if (this.commandOptions['-f']) { if (this.commandOptions['-f']) {
var args = this.commandOptions['-f']; args = this.commandOptions['-f'];
this.twoArgsImpliedHead(args, '-f'); this.twoArgsImpliedHead(args, '-f');
// we want to force a branch somewhere // we want to force a branch somewhere