Skip to content

Correctly support branch names with slashes - #259

Merged
klaussilveira merged 1 commit into
klaussilveira:masterfrom
NateEag:fix-branches-with-slashes
Feb 12, 2013
Merged

klaussilveira merged 1 commit into
klaussilveira:masterfrom
NateEag:fix-branches-with-slashes

Conversation

@NateEag

@NateEag NateEag commented Feb 12, 2013

Copy link
Copy Markdown
Contributor

Fixes #250.

Previously, branches with slashes in the name would consume all slashed
segments in a URL, causing the routes to capture incorrect file paths.

This solution is not particularly elegant - anywhere a route used
both a commit-ish identifier and a path, we collapse those two params
into a single param, and parse that param inside the route.

It seems to be working reasonably reliably, but has not seen extensive
testing.

It is also not particularly pretty. If anyone sees ways to improve it,
please, have at it.

Previously, branches with slashes in the name would consume all slashed
segments in a URL, causing the routes to capture incorrect file paths.

This solution is not particularly elegant - anywhere a route used
both a commit-ish identifier and a path, we collapse those two params
into a single param, and parse that param inside the route.

It seems to be working reasonably reliably, but has not seen extensive
testing.

It is also not particularly pretty. If anyone sees ways to improve it,
please, have at it.
klaussilveira added a commit that referenced this pull request Feb 12, 2013
Correctly support branch names with slashes
@klaussilveira
klaussilveira merged commit 5ccad64 into klaussilveira:master Feb 12, 2013
@klaussilveira

Copy link
Copy Markdown
Owner

It's safe for master, let's just create more test cases surrounding this feature.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should fallback to the default branch. Take a look at: #61

@NateEag
NateEag deleted the fix-branches-with-slashes branch February 13, 2013 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subdirectories and subsequent files unable to be viewed

2 participants