Match longest repository path towards the shortest #950

Merged
merged 1 commit into from Nov 18, 2015

Projects

None yet

3 participants

@saper
Contributor
saper commented Nov 11, 2015

Try to to match longest repository paths first:

mediawiki/extensions/SemanticMediaWiki
mediawiki/extensions
mediawiki

Bug: #949

@saper
Contributor
saper commented Nov 11, 2015

I think the better fix would be to move all the logic to something like RepositoryManager.getRepositoryFromURLPath(String), but I'm too unfamiliar with the code to propose a patch.

@saper saper Match longest repository path towards the shortest
Try to to match longest repository paths first:

mediawiki/extensions/SemanticMediaWiki
mediawiki/extensions
mediawiki

Bug: gitblit#949
c4e5664
@paladox
Contributor
paladox commented Nov 15, 2015

+1 I haven't tested but looks good.

And gitblit really does need support for these paths.

@gitblit gitblit merged commit a5cf407 into gitblit:master Nov 18, 2015
@gitblit
Owner
gitblit commented Nov 18, 2015

@saper Thanks. Looks good, works fine.

@saper
Contributor
saper commented Nov 18, 2015

Thank you!

@paladox paladox added a commit to paladox/gitblit that referenced this pull request Nov 23, 2015
@paladox paladox Copied from https://github.com/saper/gitblit/blob/c4e5664d9b7bf19dd0f…
…9dee79c8cb0d45f56bb54/src/main/java/com/gitblit/servlet/RawServlet.java

This was originally from gitblit#950 but seems to have been reverted when develop branch was merged with master.
29a570a
@gitblit gitblit added a commit that referenced this pull request Nov 23, 2015
@paladox @gitblit paladox + Match longest repository path towards the shortest pr-950
This was originally from #950 but seems to have been reverted when develop branch was merged with master.
2b1e029
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment