git ssb

39+

cel / git-ssb



Commit aea8b22decffc3d2d6d330609d45a54c8fbe3c8b

Merge branches 'collaborate' and 'require-name'

Charles Lehner committed on 10/6/2016, 8:49:36 PM
Parent: 46afa90a83a8c220adc40fb5ae4f23fda9156e70
Parent: 976247c27be1b03518c4398932709648836fb5a6

Files changed

bin.jschanged
bin.jsView
@@ -29,9 +29,9 @@
2929 return version()
3030
3131 switch (cmd) {
3232 case 'create':
33- return createRepo(config, config._[0] || 'ssb', config._[1])
33 + return createRepo(config, config._[0], config._[1])
3434 case 'fork':
3535 return forkRepo(config)
3636 case 'forks':
3737 return require('./lib/forks')(config)
@@ -83,15 +83,15 @@
8383 'Options:',
8484 ' command Command to get help with')
8585 case 'create':
8686 return out(
87- 'Usage: ' + prog + ' create [<remote> [<name>]]',
87 + 'Usage: ' + prog + ' create <remote> [<name>]',
8888 '',
8989 ' Create a new git-ssb repo and add it as a git remote',
9090 '',
9191 'Arguments:',
92- ' remote Name of the remote to add. default: \'ssb\'',
93- ' name Name to give the repo on ssb, if any')
92 + ' remote Name of the remote to add. e.g. \'origin\' or \'ssb\'',
93 + ' name Name to give the repo, if any')
9494 case 'fork':
9595 return out(
9696 'Usage: ' + prog + ' fork [<upstream>] <remote_name>',
9797 '',
@@ -171,8 +171,10 @@
171171 return !!~remotes.indexOf(name)
172172 }
173173
174174 function createRepo(config, remoteName, name, upstream) {
175 + if (config._.length == 0) return help('create')
176 + if (!remoteName) err(1, 'Missing remote name')
175177 if (hasRemote(remoteName))
176178 err(1, 'Remote \'' + remoteName + '\' already exists')
177179 u.getSbot(config, function (err, sbot) {
178180 if (err) throw err

Built with git-ssb-web