big commands refactor in prep for hackathon

This commit is contained in:
Peter Cottle 2013-07-27 23:49:27 -07:00
parent 5ec8a2916f
commit e422bdb181
11 changed files with 1071 additions and 1077 deletions

View file

@ -69,6 +69,14 @@ var Command = Backbone.Model.extend({
}
},
oneArgImpliedHead: function(args, option) {
this.validateArgBounds(args, 0, 1, option);
// and if it's one, add a HEAD to the back
if (args.length === 0) {
args.push('HEAD');
}
},
twoArgsImpliedHead: function(args, option) {
// our args we expect to be between 1 and 2
this.validateArgBounds(args, 1, 2, option);