Some features don't work on branches with slashes
See original GitHub issueAny feature that makes use of pathnameParts[4]
or getReference
don’t support branch names that contain /
.
The problem with extracting the branch from the URL is that branch/folder/folder/folder
is indistinguishable from branch/still/branch/folder
, so the branch cannot be safely determined from the URL.
fix-view-file-link-in-pr
and link-to-file-in-file-history
both have solutions for it, but I think they’re not easily copy-able.
For example getReference
could be changed to:
// Tested on the Code tab
return select('#branch-select-menu summary .css-truncate-target').textContent
Originally discussed in https://github.com/sindresorhus/refined-github/pull/2998#issuecomment-613125320 cc @yakov116
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Some features don't work on branches with slashes #3004
Any feature that makes use of pathnameParts[4] or getReference don't support branch names that contain /. The problem with extracting the ...
Read more >Using the slash character in Git branch name - Stack Overflow
I've no idea how this could have happened, but it means that your attempt to create a branch called foo/bar based off it,...
Read more >Web IDE doesn't work for branches with slashes - GitLab
Presumably similar to #45412 (closed), Web IDE currently doesn't work when starting from a branch with a slash in it, eg. "features/test".
Read more >Git branch names support forward slashes
Branch names must conform to a few simple rules. You can use the forward slash (/) to create a hierarchical name scheme. However,...
Read more >Get commit/{revision} API does not accept branch names ... - Jira
BCLOUD-15358 - REST API 2.0 to get raw content of an individual file on fails in case of slash in the branch name....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fregante we are doing a select.last. That will give you .atom
Can you also add every route where
getReference
is expected to work? e.g.