clone url generation issue
plenz at cis.fu-berlin.de
Thu May 5 16:58:38 CEST 2011
* chris <jugg at hotmail.com> [2011-05-04 13:56]:
> I use gitolite to manage my repositories, and per my gitolite
> configuration the general clone url for all of my repositories is:
> git at example.com:<project>
This is a short syntax supported by git because it resembles scp
usage, where you also do user at host:path. However, Git equally supports
the ssh://user@host/path syntax, which might be a better approach
because you explicitly state the protocol to use (ssh) so that a
browser may infer the appropriate program to call.
> clone-prefix=git at example.com:
> However, with this setup, the clone url shown on each project is incorrect,
> like so:
> git at example.com:/<project>
> Notice the erroneous forward slash being inserted between the
> clone-prefix and project name.
As far as I can see the print_url() function is responsible
(ui-summary.c), which does a simple fmt("%s/%s", base, suffix). So
you'd have to do some patching there in order to support that short
notion you're using.
I think it's best to use the long ssh:// syntax instead.
More information about the CGit