diff options
author | Linus Torvalds <torvalds@osdl.org> | 2007-01-21 11:04:13 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-01-28 12:31:56 -0800 |
commit | 4b3b1e1e488fe83a8a889ff26cf88355692b6a8c (patch) | |
tree | b7456735549891dbb9ab053916556e4837c458a4 /daemon.c | |
parent | 57e7a0a49496fa3c2b2514b6a23ad661ecb428a6 (diff) | |
download | git-4b3b1e1e488fe83a8a889ff26cf88355692b6a8c.tar.gz |
git-push through git protocol
This allows pushing over the git:// protocol, and while it's not
authenticated, it could make sense from within a firewalled
setup where nobody but trusted internal people can reach the git
port. git-daemon is possibly easier and faster to set up in the
kind of situation where you set up git instead of CVS inside a
company.
"git-receive-pack" is disabled by default, so you need to enable it
explicitly by starting git-daemon with the "--enable=receive-pack"
command line argument, or by having your config enable it automatically.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'daemon.c')
-rw-r--r-- | daemon.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -372,9 +372,16 @@ static int upload_archive(void) return -1; } +static int receive_pack(void) +{ + execl_git_cmd("receive-pack", ".", NULL); + return -1; +} + static struct daemon_service daemon_service[] = { { "upload-archive", "uploadarch", upload_archive, 0, 1 }, { "upload-pack", "uploadpack", upload_pack, 1, 1 }, + { "receive-pack", "receivepack", receive_pack, 0, 1 }, }; static void enable_service(const char *name, int ena) { |