diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2022-09-02 18:56:45 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-09-02 20:02:56 +0300 |
commit | 951759d3a5cb20ffeff4836aa0c4b793fa142b51 (patch) | |
tree | d9571e3fba9778a361d15487ff00be280fe25ba8 /scalar.c | |
parent | dd9603e22822fab19c0557dad0cf1825de325403 (diff) |
scalar: implement the `help` subcommand
It is merely handing off to `git help scalar`.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'scalar.c')
-rw-r--r-- | scalar.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -819,6 +819,25 @@ static int cmd_delete(int argc, const char **argv) return res; } +static int cmd_help(int argc, const char **argv) +{ + struct option options[] = { + OPT_END(), + }; + const char * const usage[] = { + "scalar help", + NULL + }; + + argc = parse_options(argc, argv, NULL, options, + usage, 0); + + if (argc != 0) + usage_with_options(usage, options); + + return run_git("help", "scalar", NULL); +} + static int cmd_version(int argc, const char **argv) { int verbose = 0, build_options = 0; @@ -858,6 +877,7 @@ static struct { { "run", cmd_run }, { "reconfigure", cmd_reconfigure }, { "delete", cmd_delete }, + { "help", cmd_help }, { "version", cmd_version }, { "diagnose", cmd_diagnose }, { NULL, NULL}, |