On Sun, Feb 9, 2014 at 12:29 AM, Andrew Keller <[email protected]> wrote: > On Feb 8, 2014, at 8:37 AM, Dongsheng Song wrote: > >> I have an git repo PROJECT.git, the full path is /srv/repo/git/PROJECT.git, >> when I set git_base_url_list in gitweb.conf: >> >> @git_base_url_list = qw(https://192.168.30.239/repo/git >> [email protected]:repo/git); >> >> I got the result: >> >> https://192.168.30.239/repo/git/PROJECT.git >> [email protected]:/PROJECT.git >> >> This is wrong, it should be (without the leading '/') >> [email protected]:PROJECT.git > > There is no way to generate a fetch url of '[email protected]:PROJECT.git' > in gitweb. > > If one of the base urls was '[email protected]:.', then you could get a > fetch URL of '[email protected]:./PROJECT.git' > > In general, though, I like to stay away from relative paths. Weird things > can happen, like HTTP works but SSH doesn't, because the home directory for > SSH changed because you used a different user. > > - Andrew >
What's about the following translate rules ? [email protected]: -> [email protected]:PROJECT.git [email protected]:/ -> [email protected]:/PROJECT.git [email protected]:/repo -> [email protected]:/repo/PROJECT.git [email protected]:/repo/ -> [email protected]:/repo/PROJECT.git I don't know Perl, but I think change the following translate code is not a hard work: # use per project git URL list in $projectroot/$project/cloneurl # or make project git URL from git base URL and project name my $url_tag = "URL"; my @url_list = git_get_project_url_list($project); @url_list = map { "$_/$project" } @git_base_url_list unless @url_list; foreach my $git_url (@url_list) { next unless $git_url; print format_repo_url($url_tag, $git_url); $url_tag = ""; } Regards, Dongsheng -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

