Skip to content

Commit 951759d

Browse files
dschogitster
authored andcommitted
scalar: implement the help subcommand
It is merely handing off to `git help scalar`. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Victoria Dye <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dd9603e commit 951759d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

scalar.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,25 @@ static int cmd_delete(int argc, const char **argv)
819819
return res;
820820
}
821821

822+
static int cmd_help(int argc, const char **argv)
823+
{
824+
struct option options[] = {
825+
OPT_END(),
826+
};
827+
const char * const usage[] = {
828+
"scalar help",
829+
NULL
830+
};
831+
832+
argc = parse_options(argc, argv, NULL, options,
833+
usage, 0);
834+
835+
if (argc != 0)
836+
usage_with_options(usage, options);
837+
838+
return run_git("help", "scalar", NULL);
839+
}
840+
822841
static int cmd_version(int argc, const char **argv)
823842
{
824843
int verbose = 0, build_options = 0;
@@ -858,6 +877,7 @@ static struct {
858877
{ "run", cmd_run },
859878
{ "reconfigure", cmd_reconfigure },
860879
{ "delete", cmd_delete },
880+
{ "help", cmd_help },
861881
{ "version", cmd_version },
862882
{ "diagnose", cmd_diagnose },
863883
{ NULL, NULL},

0 commit comments

Comments
 (0)