author | Lars Hjemli <hjemli@gmail.com> | 2008-08-05 23:20:24 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-08-06 09:21:09 (UTC) |
commit | 02a545e63454530c1639014d3239c14ced2022c6 (patch) (side-by-side diff) | |
tree | da4c89a94b117d936f2eeb486c9dedf192e6746e /cmd.c | |
parent | 0f0ab148c6d444316af10e6b4c7a60630fed45d3 (diff) | |
download | cgit-02a545e63454530c1639014d3239c14ced2022c6.zip cgit-02a545e63454530c1639014d3239c14ced2022c6.tar.gz cgit-02a545e63454530c1639014d3239c14ced2022c6.tar.bz2 |
Add support for cloning over http
This patch implements basic support for cloning over http, based on the
work on git-http-backend by Shawn O. Pearce.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cmd.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -13,2 +13,3 @@ #include "ui-blob.h" +#include "ui-clone.h" #include "ui-commit.h" @@ -24,2 +25,7 @@ +static void HEAD_fn(struct cgit_context *ctx) +{ + cgit_clone_head(ctx); +} + static void about_fn(struct cgit_context *ctx) @@ -47,2 +53,7 @@ static void diff_fn(struct cgit_context *ctx) +static void info_fn(struct cgit_context *ctx) +{ + cgit_clone_info(ctx); +} + static void log_fn(struct cgit_context *ctx) @@ -61,2 +72,7 @@ static void ls_cache_fn(struct cgit_context *ctx) +static void objects_fn(struct cgit_context *ctx) +{ + cgit_clone_objects(ctx); +} + static void repolist_fn(struct cgit_context *ctx) @@ -104,2 +120,3 @@ struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx) static struct cgit_cmd cmds[] = { + def_cmd(HEAD, 1, 0), def_cmd(about, 0, 1), @@ -108,4 +125,6 @@ struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx) def_cmd(diff, 1, 1), + def_cmd(info, 1, 0), def_cmd(log, 1, 1), def_cmd(ls_cache, 0, 0), + def_cmd(objects, 1, 0), def_cmd(patch, 1, 0), |