From 380bcfaa4be9c7a10ef7e1ff836c76be9732f298 Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Tue, 16 Jul 2013 09:13:11 -0700 Subject: [PATCH] fake teamwork better --- src/js/git/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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