aboutsummaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmd.c b/cmd.c
index 188cd56..889ed05 100644
--- a/cmd.c
+++ b/cmd.c
@@ -136,6 +136,16 @@ 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_layout, want_vpath, is_clone) \
{#name, name##_fn, want_repo, want_layout, want_vpath, is_clone}
@@ -162,6 +172,8 @@ struct cgit_cmd *cgit_get_cmd(void)
def_cmd(summary, 1, 1, 0, 0),
def_cmd(tag, 1, 1, 0, 0),
def_cmd(tree, 1, 1, 1, 0),
+ {"git-upload-pack", git_upload_pack_fn, 1, 0, 0, 1},
+ {"git-receive-pack", git_receive_pack_fn, 1, 0, 0, 1},
};
int i;