Skip to content

Commit

Permalink
scalar: implement the help subcommand
Browse files Browse the repository at this point in the history
It is merely handing off to `git help scalar`.

Signed-off-by: Johannes Schindelin <johasc@microsoft.com>
  • Loading branch information
dscho committed Sep 19, 2022
1 parent 54f277e commit c69c30c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions contrib/scalar/scalar.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,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[] = {
N_("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;
Expand Down Expand Up @@ -868,6 +887,7 @@ static struct {
{ "run", cmd_run },
{ "reconfigure", cmd_reconfigure },
{ "delete", cmd_delete },
{ "help", cmd_help },
{ "version", cmd_version },
{ "diagnose", cmd_diagnose },
{ NULL, NULL},
Expand Down

0 comments on commit c69c30c

Please sign in to comment.