Clarify how repository service parameters are used
PATCH 1/1 Clarify how repository service parameters are used
At upload-archive service, mention repository option daemon.uploadarchive. Add a paragrah and example to show how the service parameters are added to the repository's config file.
--- Documentation/git-daemon.txt | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-)
Documentation/git-daemon.txt +15 -1
@@ -164,7 +164,21 @@ upload-pack:: item to `false`. upload-archive:: - This serves `git-archive --remote`. + This serves `git-archive --remote`. This is the + repository setting `daemon.uploadarchive`. + +Instead of globally using `--enable=service`, it might be more +advisable to configure these items by repository basis. The +configuration file is ./config, supposing that the repository +was created with `git --bare init [--share]`. The services would +be listed as: + +------------------------------------------------ +... +[daemon] + uploadpack = true + uploadarchive = true +------------------------------------------------ EXAMPLES --------
Signature · 4 lines
1.5.3.rc5
Available also from git repository http://cante.net/~jaalto/git/git
Branch: Documentation/git-daemon.txt+clarify-how-repo-DAEMON-parms-are-usedQuoted 16 lines · Jari Aalto
At upload-archive service, mention repository option daemon.uploadarchive. Add a paragrah and example to show how the service parameters are added to the repository's config file.
Signed-off-by Jari Aalto <[email protected]>--- Documentation/git-daemon.txt | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-)Documentation/git-daemon.txt +0
-0@@ -164,7 +164,21 @@ upload-pack:: item to `false`.
Documentation/git-daemon.txt upload-pack:: · line 174
Quoted 10 lines
Documentation/git-daemon.txt +8
-1upload-archive:: - This serves `git-archive --remote`. + This serves `git-archive --remote`. This is the + repository setting `daemon.uploadarchive`. + +Instead of globally using `--enable=service`, it might be more +advisable to configure these items by repository basis. The +configuration file is ./config, supposing that the repository +was created with `git --bare init [--share]`. The services would +be listed as:
"This is the repository setting"? The service is not repository setting. It can be controlled by the configuration variable.
"It might be more advisable"? If you advise, indicate what considerations there are when picking between the two. Otherwise you would confuse users.
The filename is ./config only because it is $GIT_DIR/config; there is nothing new here, and not worth mentioning. If you are running git-daemon, you should be at least familiar enough to know that per-repository configuration file is always there.
Saying the configuration file is ./config (and not .git/config), and the part "supposing that ..." both imply that use of bare repository is recommended. While I like the idea of strongly encouraging the use of bare repositories for the purpose of git-daemon, I do not think SERVICES section is the place to do so. These implications are not strong enough either, so if we want to have something to encourage bare repositories, we should dedicate a separate paragraph to do so.
I think the last item might be controvercial, so I'd rather omit the "bare" part. Here is a suggested rewrite.
--- Documentation/git-daemon.txt | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-)
Documentation/git-daemon.txt +30 -1
@@ -157,6 +157,12 @@ the facility of inet daemon to achieve the same before spawning SERVICES -------- +These services can be globally enabled/disabled using the command +line options of this command. If a finer-grained control is +desired (e.g. to allow `git-archive` to be run against only a +selected repositories the daemon serves), per-repository +configuration file can be used to enable/disable them. + upload-pack:: This serves `git-fetch-pack` and `git-peek-remote` clients. It is enabled by default, but a repository can
@@ -164,7 +170,18 @@ upload-pack:: item to `false`. upload-archive:: - This serves `git-archive --remote`. + This serves `git-archive --remote`. It is disabled by + default, but a repository can enable it by setting + `daemon.uploadarchive` configuration item to `true`. + +receive-pack:: + This serves `git-send-pack` clients, allowing anonymous + push. It is disabled by default, as there is _no_ + authentication in the protocol (for that, use the + "git over ssh" protocol, not `git-daemon`). It can be + enabled by `daemon.receivepack` configuration item to + `true`. + EXAMPLES --------
@@ -229,6 +246,18 @@ Repositories can still be accessed by hostname though, assuming they correspond to these IP addresses. +To enable `git-archive --remote` and disable `git-fetch` against +a repository, have this in the configuration file in the +repository (that is the file 'config' next to 'HEAD', 'refs' and +'objects'). ++ +---------------------------------------------------------------- +[daemon] + uploadpack = false + uploadarchive = true +---------------------------------------------------------------- + + Author ------ Written by Linus Torvalds <[email protected]>, YOSHIFUJI Hideaki