git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] daemon: add upload-tar service.

From
Junio C Hamano <junkio@cox.net>
Date
Aug 21, 2006, 02:09 UTC
Message-ID
<7vsljqx2jm.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vy7tjxdas.fsf@assigned-by-dhcp.cox.net>
This allows clients to ask for tarballs with:
	git tar-tree --remote=git://server/repo refname

By default, the upload-tar service is not enabled. To enable it server-wide, the server can be started with:

	git-daemon --enable=upload-tar

This service is by default overridable per repostiory, so alternatively, a repository can define "daemon.uploadtar = true" to enable it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 daemon.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/daemon.c b/daemon.c
index 0a6cbb4..5549014 100644
--- a/daemon.c
+++ b/daemon.c
@@ -321,8 +321,15 @@ static int upload_pack(void)
 	return -1;
 }
 
+static int upload_tar(void)
+{
+	execl_git_cmd("upload-tar", ".", NULL);
+	return -1;
+}
+
 static struct daemon_service daemon_service[] = {
 	{ "upload-pack", "uploadpack", upload_pack, 1, 1 },
+	{ "upload-tar", "uploadtar", upload_tar, 0, 1 },
 };
 
 static void enable_service(const char *name, int ena) {
-- 
1.4.2.g0cac8
Previous: Junio C HamanoNext: Martin Langhoff
Message 22 of 30 in “Unresolved issues #3”
  1. Junio C HamanoAug 18, 2006
  2. A Large Angry SCMAug 18, 2006
  3. Nicolas PitreAug 18, 2006
  4. A Large Angry SCMAug 18, 2006
  5. Nicolas PitreAug 18, 2006
  6. A Large Angry SCMAug 19, 2006
  7. Nicolas PitreAug 20, 2006
  8. Junio C HamanoAug 20, 2006
  9. A Large Angry SCMAug 21, 2006
  10. Jeff KingAug 18, 2006
  11. Catalin MarinasAug 18, 2006
  12. Junio C HamanoAug 18, 2006
  13. Catalin MarinasAug 18, 2006
  14. Jakub NarebskiAug 18, 2006
  15. Aneesh Kumar K.VAug 18, 2006
  16. Jakub NarebskiAug 18, 2006
  17. Aneesh Kumar K.VAug 18, 2006
  18. Jakub NarebskiAug 18, 2006
  19. Jon LoeligerAug 18, 2006
  20. Junio C HamanoAug 20, 2006
  21. daemon: prepare for multiple services.Junio C Hamano, Aug 21, 2006
  22. daemon: add upload-tar service.Junio C Hamano, Aug 21, 2006
  23. Martin LanghoffAug 23, 2006
  24. Jakub NarebskiAug 25, 2006
  25. Unresolved issues #4Junio C Hamano, Oct 6, 2006
  26. Jakub NarebskiOct 6, 2006
  27. Shawn PearceOct 6, 2006
  28. Jon LoeligerOct 6, 2006
  29. Shawn PearceOct 6, 2006
  30. A Large Angry SCMOct 6, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.