]> granicus.if.org Git - cgit/commitdiff
Merge branch 'lh/clone'
authorLars Hjemli <hjemli@gmail.com>
Mon, 1 Sep 2008 20:40:24 +0000 (22:40 +0200)
committerLars Hjemli <hjemli@gmail.com>
Mon, 1 Sep 2008 20:40:24 +0000 (22:40 +0200)
* lh/clone:
  Add support for cloning over http

Conflicts:
cmd.c

1  2 
Makefile
cmd.c

diff --cc Makefile
index 1163b026b19b1f3e31680feae081996c54093896,78aad100e74af1d035445ad7ecb2e77a20894d33..b002d4472c4ed2e1a353aea724110c36fd69ab57
+++ b/Makefile
@@@ -55,8 -55,8 +55,9 @@@ OBJECTS += configfile.
  OBJECTS += html.o
  OBJECTS += parsing.o
  OBJECTS += shared.o
 +OBJECTS += ui-atom.o
  OBJECTS += ui-blob.o
+ OBJECTS += ui-clone.o
  OBJECTS += ui-commit.o
  OBJECTS += ui-diff.o
  OBJECTS += ui-log.o
diff --cc cmd.c
index c0e4db3a6c62f5cdb8aa59ae47bbd323fd3b66a3,03e165c169c7c4c6bc99350552b66ca7e795c0e6..40ac53e47ab6007f816dc931bb01f67eaa5d290d
--- 1/cmd.c
--- 2/cmd.c
+++ b/cmd.c
@@@ -10,8 -10,8 +10,9 @@@
  #include "cmd.h"
  #include "cache.h"
  #include "ui-shared.h"
 +#include "ui-atom.h"
  #include "ui-blob.h"
+ #include "ui-clone.h"
  #include "ui-commit.h"
  #include "ui-diff.h"
  #include "ui-log.h"
  #include "ui-tag.h"
  #include "ui-tree.h"
  
+ static void HEAD_fn(struct cgit_context *ctx)
+ {
+       cgit_clone_head(ctx);
+ }
 +static void atom_fn(struct cgit_context *ctx)
 +{
 +      cgit_print_atom(ctx->qry.head, ctx->qry.path, 10);
 +}
 +
  static void about_fn(struct cgit_context *ctx)
  {
        if (ctx->repo)
@@@ -108,7 -118,7 +124,8 @@@ static void tree_fn(struct cgit_contex
  struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx)
  {
        static struct cgit_cmd cmds[] = {
+               def_cmd(HEAD, 1, 0),
 +              def_cmd(atom, 1, 0),
                def_cmd(about, 0, 1),
                def_cmd(blob, 1, 0),
                def_cmd(commit, 1, 1),