Files: a09b2ebd1be805f4383f7b7b114a14678b39d5bb / lib / fork.js
460 bytesRaw
1 | var u = require('./util') |
2 | |
3 | module.exports = function (argv) { |
4 | if (argv.help || argv._.length < 1 || argv._.length > 2) return require('./help')('fork') |
5 | |
6 | var repo |
7 | if (argv._.length == 1) repo = u.getRemote() |
8 | else if (argv._.length == 2) repo = u.getRemote(argv._.shift()) |
9 | if (!repo) throw 'unable to find git-ssb upstream repo' |
10 | var name = argv._[0] |
11 | if (!name) throw 'missing remote name' |
12 | require('./create').createRepo(argv, name, null, repo) |
13 | } |
14 |
Built with git-ssb-web