[PATCH v2] ui-shared: split repository link into directories

Petr Vorel petr.vorel at gmail.com
Fri Apr 29 01:14:37 CEST 2016

Dear John,

thanks for comments and tips.

> I think we should have a configuration option for this as it changes the
> behaviour.  However, I'm not sure what the patch below does because...
Not a problem, I'll can add config value into v3.


> I'm guessing you intended to allow the repository at a/b/c to link to
> the directories a/b and a,
You're right, a, b and c are clickable going to "itself".
> which would require changing this to use cgit_pageurl().

> But we also need to use repo->url which may be
> unrelated to repo->name; that won't be the case if repositories are
> discovered with "scan-path" (which I suspect is the most common
> configuration), but repositories added with "repo.url" and "repo.name"
> can have completely different values for these two variables.
You're right, I just tested it with "scan-path".

I'm testing it with this config:



repo.desc=This is my git repository

repo.desc=This is my git repository

repo.desc=This is my git repository

repo.desc=This is my git repository

You right, it's broken is when I set repo.url and repo.name (e.g.
section/subsection/myrepo3) - all links point to repo.url; working if I set just repo.url.

> We may just have to bail out of this feature if the two variables differ.
Is it really the best way from UI/UX POV? Inconsistency isn't nice :-(. I'd like to try
to have this feature either on or off for each repository.

Kind regards,

More information about the CGit mailing list