Files: 28bf61d928af584e5e33b424fc41deafa9dddb77 / lib / index.js
1110 bytesRaw
1 | var cmds = require('./cmds') |
2 | |
3 | exports.help = ` |
4 | Usage: git ssb [--version] [command] [--help] |
5 | |
6 | Commands: |
7 | create Create a git repo on SSB and add it as a git remote |
8 | create-id Create a git repo on SSB |
9 | fork Fork a git repo on SSB |
10 | forks List forks of a repo |
11 | issues List issues for a repo |
12 | prs List pull requests for a repo |
13 | authors List contributors to a repo |
14 | log List history of updates to a repo |
15 | name Name a repo |
16 | named Search for repos by name |
17 | pull-request Create a pull-request |
18 | web Serve a web server for repos |
19 | help Get help about a command |
20 | reconstruct Reconstruct blobs for a git-update SSB message |
21 | find-object Find a git object in a repo |
22 | ` |
23 | |
24 | exports.fn = function (argv) { |
25 | if (argv.version) return require('./version').fn(argv) |
26 | if (argv.help) return require('./help').fn(argv) |
27 | if (argv._.length === 0) return require('./help').fn(argv) |
28 | |
29 | var cmd = argv._.shift() |
30 | var mod = cmds.getCmd(cmd) |
31 | var fn = mod && mod.fn |
32 | if (!fn) throw `No such command '${cmd}'` |
33 | fn(argv) |
34 | } |
35 |
Built with git-ssb-web