summaryrefslogtreecommitdiffstatshomepage
path: root/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd.c b/cmd.c
index bf6d8f5..7f1ca98 100644
--- a/cmd.c
+++ b/cmd.c
@@ -164,6 +164,17 @@ static void tree_fn(void)
cgit_print_tree(ctx.qry.sha1, ctx.qry.path);
}
+static void git_upload_pack_fn(void)
+{
+ cgit_clone_git_upload_pack();
+}
+
+static void git_receive_pack_fn(void)
+{
+ cgit_clone_git_receive_pack();
+}
+
+
#define def_cmd(name, want_repo, want_vpath, is_clone) \
{#name, name##_fn, want_repo, want_vpath, is_clone}
@@ -191,6 +202,8 @@ struct cgit_cmd *cgit_get_cmd(void)
def_cmd(summary, 1, 0, 0),
def_cmd(tag, 1, 0, 0),
def_cmd(tree, 1, 1, 0),
+ {"git-upload-pack", git_upload_pack_fn, 1, 0, 1},
+ {"git-receive-pack", git_receive_pack_fn, 1, 0, 1},
};
int i;