]> git.proxmox.com Git - libgit2.git/blobdiff - src/cli/cmd.c
Merge https://salsa.debian.org/debian/libgit2 into proxmox/bullseye
[libgit2.git] / src / cli / cmd.c
diff --git a/src/cli/cmd.c b/src/cli/cmd.c
new file mode 100644 (file)
index 0000000..2a7e71c
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) the libgit2 contributors. All rights reserved.
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+
+#include "cli.h"
+#include "cmd.h"
+
+const cli_cmd_spec *cli_cmd_spec_byname(const char *name)
+{
+       const cli_cmd_spec *cmd;
+
+       for (cmd = cli_cmds; cmd->name; cmd++) {
+               if (!strcmp(cmd->name, name))
+                       return cmd;
+       }
+
+       return NULL;
+}