Le mer 23 ao=FBt 2006 22:11, Junio C Hamano a =E9crit :
fair enough, so I suppose there is many choices:
* replace --use-vhosts with --use-vhosts=3D${default hostname}
but I do not like it very much
* use `hostname -f` as the default hostname (not very nice either)
* use the magic _default_ (=E0 la apache) hostname ?
But just note that if a git repository is accessible on an host that is=20
not the default, and only on that one, an older client won't be able to=20
clone the repository anyway, because he will be redirected to the=20
default virtual host. Meaning, that someone that uses virtual hosts=20
will break older clients anyway.
what would be nicer would be a way to gracefully reject older clients in=20
that case with an understandable error message, so that the user knows=20
why it does not work. I don't know PROTO_GIT very well yet,so I don't=20
know if older client support such communications yet or not.
Another option would be not to support virtual hosts, but instead=20
superseed the --base-path and --user-path with some --base-path-fmt=20
and --user-path-fmt where the user can specify how to build the path=20
with simple sprintf-like formats. One could e.g. support:
* %% obviously ;
* %h that will be replaced with the hostname
* %u (only for --user-path-fmt)
* %p (asked path)
* ...
I think that's more clever, and allow more flexible use of the virtual=20
hosting code. It e.g. allow to use the virtual host scheme for the=20
`base-path` repos and to disallow it for the users.
=2D-*-path and --*-path-fmt are obviously mutually exclusive.
What do you think ?
=2D-=20
=B7O=B7 Pierre Habouzit
=B7=B7O madcoder@debian.org
OOO http://www.madism.org