return res;
}
+static int cmd_list(int argc, const char **argv)
+{
+ if (argc != 1)
+ die(_("`scalar list` does not take arguments"));
+
+ if (run_git("config", "--global", "--get-all", "scalar.repo", NULL) < 0)
+ return -1;
+ return 0;
+}
+
static int cmd_register(int argc, const char **argv)
{
struct option options[] = {
const char *name;
int (*fn)(int, const char **);
} builtins[] = {
+ { "list", cmd_list },
{ "register", cmd_register },
{ "unregister", cmd_unregister },
{ NULL, NULL},
SYNOPSIS
--------
[verse]
+scalar list
scalar register [<enlistment>]
scalar unregister [<enlistment>]
will be identical to the worktree.
The `scalar` command implements various subcommands, and different options
-depending on the subcommand.
+depending on the subcommand. With the exception of `list`, all subcommands
+expect to be run in an enlistment.
COMMANDS
--------
+List
+~~~~
+
+list::
+ List enlistments that are currently registered by Scalar. This
+ subcommand does not need to be run inside an enlistment.
+
Register
~~~~~~~~