-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow utf-8 page names when not using grit. Resolves #830 (when using rugged adapter). #929
Conversation
@@ -22,6 +22,13 @@ | |||
# Fix to_url | |||
class String | |||
alias :upstream_to_url :to_url | |||
|
|||
unless defined?(Grit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't introduce a reference to the Grit class in gollum. How about checking which git adapter gollum is using?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not possible at the moment: although we can check whether GIT_ADAPTER != 'grit'
, that doesn't ensure that gollum-lib will not fall back on grit anyway (when GIT_ADAPTER
cannot be required). See here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that doesn't ensure that gollum-lib will not fall back on grit anyway (when GIT_ADAPTER cannot be required)
Well, it looks like that code will throw a LoadError if Gollum::GIT_ADAPTER
is defined but requiring the corresponding adapter fails. But you are right that if GIT_ADAPTER
isn't defined, then grit will be used (for now). But what about
unless ! is_defined?(Gollum::GIT_ADAPTER) || Gollum::GIT_ADAPTER == 'grit'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
b116957
to
355db16
Compare
@bartkamphorst: pushed the change. |
Allow utf-8 page names when not using grit. Resolves #830 (when using rugged adapter).
Support Wiki with UTF-8 page name ## What does this MR do? Support Wiki with UTF-8 page name. See gollum/gollum#929 ## Why was this MR needed? Relax constraints for wiki slug in aac6598. It allows to create a wiki with UTF-8 name, but creating a wiki with UTF-8 name causes 500 error. Creating a wiki with UTF-8 name once, then creating or updating wiki with ascii name also cause 500 error i.e. no one can create and update any wiki pages in the project. ## Workaround 1. Go to `https://DOMAIN/repo/wikis/git_access` -> this page display the link to git clone 2. Clone the wiki repo 3. Find the page with UTF-8 name 4. Rename or Delete these files 5. Commit and push ## What are the relevant issue numbers? - #13979 - #13891 - #13698 - #13603 - #13317 - #12906 - #12825 - #10945 ## Todo - [x] Waiting for 'gollum-rugged_adapter' that support rugged v0.24.0 release 'gollum-rugged_adapter' gem doesn't allow to install rugged v0.24.0 (it's still beta version), but 'gitlab_git' gem depends on rugged v0.24.0b13. So it can't install both 'gollum-rugged_adapter' and 'gitlab_git' now. See merge request !2999
Allow utf-8 page names when not using grit. Resolves gollum#830 (when using rugged adapter).
No description provided.