Skip to content

Commit 4b3b1e1

Browse files
Linus TorvaldsJunio C Hamano
authored andcommitted
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>
1 parent 57e7a0a commit 4b3b1e1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

daemon.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,16 @@ static int upload_archive(void)
372372
return -1;
373373
}
374374

375+
static int receive_pack(void)
376+
{
377+
execl_git_cmd("receive-pack", ".", NULL);
378+
return -1;
379+
}
380+
375381
static struct daemon_service daemon_service[] = {
376382
{ "upload-archive", "uploadarch", upload_archive, 0, 1 },
377383
{ "upload-pack", "uploadpack", upload_pack, 1, 1 },
384+
{ "receive-pack", "receivepack", receive_pack, 0, 1 },
378385
};
379386

380387
static void enable_service(const char *name, int ena) {

0 commit comments

Comments
 (0)