{"thread":{"id":"9686","subject":"[PATCH] Clarify how repository service parameters are used","startedAt":"2007-08-29T09:14:20Z","lastAt":"2007-08-29T09:34:17Z","messageCount":2,"participants":["Jari Aalto","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"51786","messageId":"absa3doz.fsf@cante.net","threadId":"9686","inReplyTo":null,"subject":"[PATCH] Clarify how repository service parameters are used","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2007-08-29T09:14:20Z","receivedAt":"2007-08-29T09:14:20Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"At upload-archive service, mention repository option\ndaemon.uploadarchive. Add a paragrah and example to show how the\nservice parameters are added to the repository's config file.\n\nSigned-off-by: Jari Aalto <jari.aalto@cante.net>\n---\n Documentation/git-daemon.txt |   16 +++++++++++++++-\n 1 files changed, 15 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\nindex f902161..0aeff70 100644\n--- a/Documentation/git-daemon.txt\n+++ b/Documentation/git-daemon.txt\n@@ -164,7 +164,21 @@ upload-pack::\n \titem to `false`.\n \n upload-archive::\n-\tThis serves `git-archive --remote`.\n+\tThis serves `git-archive --remote`. This is the\n+        repository setting `daemon.uploadarchive`.\n+\n+Instead of globally using `--enable=service`, it might be more\n+advisable to configure these items by repository basis. The\n+configuration file is ./config, supposing that the repository\n+was created with `git --bare init [--share]`. The services would\n+be listed as:\n+\n+------------------------------------------------\n+...\n+[daemon]\n+        uploadpack    = true\n+        uploadarchive = true\n+------------------------------------------------\n \n EXAMPLES\n --------\n-- \n1.5.3.rc5\n\n    Available also from git repository http://cante.net/~jaalto/git/git\n    Branch: Documentation/git-daemon.txt+clarify-how-repo-DAEMON-parms-are-used\n"},{"id":"51788","messageId":"7vr6lmr8fa.fsf@gitster.siamese.dyndns.org","threadId":"9686","inReplyTo":"absa3doz.fsf@cante.net","subject":"Re: [PATCH] Clarify how repository service parameters are used","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-29T09:34:17Z","receivedAt":"2007-08-29T09:34:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jari Aalto <jari.aalto@cante.net> writes:\n\n> At upload-archive service, mention repository option\n> daemon.uploadarchive. Add a paragrah and example to show how the\n> service parameters are added to the repository's config file.\n>\n> Signed-off-by: Jari Aalto <jari.aalto@cante.net>\n> ---\n>  Documentation/git-daemon.txt |   16 +++++++++++++++-\n>  1 files changed, 15 insertions(+), 1 deletions(-)\n>\n> diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\n> index f902161..0aeff70 100644\n> --- a/Documentation/git-daemon.txt\n> +++ b/Documentation/git-daemon.txt\n> @@ -164,7 +164,21 @@ upload-pack::\n>  \titem to `false`.\n>  \n>  upload-archive::\n> -\tThis serves `git-archive --remote`.\n> +\tThis serves `git-archive --remote`. This is the\n> +        repository setting `daemon.uploadarchive`.\n> +\n> +Instead of globally using `--enable=service`, it might be more\n> +advisable to configure these items by repository basis. The\n> +configuration file is ./config, supposing that the repository\n> +was created with `git --bare init [--share]`. The services would\n> +be listed as:\n\n\"This is the repository setting\"?  The service is not repository\nsetting.  It can be controlled by the configuration variable.\n\n\"It might be more advisable\"?  If you advise, indicate what\nconsiderations there are when picking between the two.\nOtherwise you would confuse users.\n\nThe filename is ./config only because it is $GIT_DIR/config;\nthere is nothing new here, and not worth mentioning.  If you are\nrunning git-daemon, you should be at least familiar enough to\nknow that per-repository configuration file is always there.\n\nSaying the configuration file is ./config (and not .git/config),\nand the part \"supposing that ...\" both imply that use of bare\nrepository is recommended.  While I like the idea of strongly\nencouraging the use of bare repositories for the purpose of\ngit-daemon, I do not think SERVICES section is the place to do\nso.  These implications are not strong enough either, so if we\nwant to have something to encourage bare repositories, we should\ndedicate a separate paragraph to do so.\n\nI think the last item might be controvercial, so I'd rather omit\nthe \"bare\" part.  Here is a suggested rewrite.\n\n---\n Documentation/git-daemon.txt |   31 ++++++++++++++++++++++++++++++-\n 1 files changed, 30 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\nindex f902161..5dbf016 100644\n--- a/Documentation/git-daemon.txt\n+++ b/Documentation/git-daemon.txt\n@@ -157,6 +157,12 @@ the facility of inet daemon to achieve the same before spawning\n SERVICES\n --------\n \n+These services can be globally enabled/disabled using the command\n+line options of this command.  If a finer-grained control is\n+desired (e.g. to allow `git-archive` to be run against only a\n+selected repositories the daemon serves), per-repository\n+configuration file can be used to enable/disable them.\n+\n upload-pack::\n \tThis serves `git-fetch-pack` and `git-peek-remote`\n \tclients.  It is enabled by default, but a repository can\n@@ -164,7 +170,18 @@ upload-pack::\n \titem to `false`.\n \n upload-archive::\n-\tThis serves `git-archive --remote`.\n+\tThis serves `git-archive --remote`.  It is disabled by\n+\tdefault, but a repository can enable it by setting\n+\t`daemon.uploadarchive` configuration item to `true`.\n+\n+receive-pack::\n+\tThis serves `git-send-pack` clients, allowing anonymous\n+\tpush.  It is disabled by default, as there is _no_\n+\tauthentication in the protocol (for that, use the\n+\t\"git over ssh\" protocol, not `git-daemon`).  It can be\n+\tenabled by `daemon.receivepack` configuration item to\n+\t`true`.\n+\n \n EXAMPLES\n --------\n@@ -229,6 +246,18 @@ Repositories can still be accessed by hostname though, assuming\n they correspond to these IP addresses.\n \n \n+To enable `git-archive --remote` and disable `git-fetch` against\n+a repository, have this in the configuration file in the\n+repository (that is the file 'config' next to 'HEAD', 'refs' and\n+'objects').\n++\n+----------------------------------------------------------------\n+[daemon]\n+\tuploadpack = false\n+\tuploadarchive = true\n+----------------------------------------------------------------\n+\n+\n Author\n ------\n Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki\n"}]}