diff --git a/src/js/git/index.js b/src/js/git/index.js index 84d553af..49257df7 100644 --- a/src/js/git/index.js +++ b/src/js/git/index.js @@ -1142,11 +1142,9 @@ GitEngine.prototype.fakeTeamworkStarter = function() { } this.validateArgBounds(this.generalArgs, 0, 2); - // ugly command line arg parsing - var branch = this.generalArgs[0] || 'master'; - if (!this.origin.refs[branch]) { - branch = 'master'; - } + // allow formats of: git Faketeamwork 2 or git Faketeamwork side 3 + var branch = (this.origin.refs[this.generalArgs[0]]) ? + this.generalArgs[0] || 'master'; var numToMake = parseInt(this.generalArgs[0], 10) || this.generalArgs[1] || 1; // make sure its a branch and exists