Merge pull request #823 from cbrenberg/821-master-to-main-onclick

change master to main in CLI output when checking out via click
This commit is contained in:
Peter Cottle 2021-04-16 09:02:20 -06:00 committed by GitHub
commit feb4782623
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -467,7 +467,12 @@ var VisBranch = VisBase.extend({
return;
}
var commandStr = 'git checkout ' + this.get('branch').get('id');
var branchName = this.get('branch').get('id');
if (branchName.match(/\bmaster\b/)) {
branchName = branchName.replace(/\bmaster\b/, 'main');
}
var commandStr = 'git checkout ' + branchName;
var Main = require('../app');
Main.getEventBaton().trigger('commandSubmitted', commandStr);
},