Skip to content
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

Merged
merged 1 commit into from
Jan 4, 2015

Conversation

dometto
Copy link
Member

@dometto dometto commented Jan 3, 2015

No description provided.

@@ -22,6 +22,13 @@
# Fix to_url
class String
alias :upstream_to_url :to_url

unless defined?(Grit)
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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'

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@dometto
Copy link
Member Author

dometto commented Jan 4, 2015

@bartkamphorst: pushed the change.

dometto pushed a commit that referenced this pull request Jan 4, 2015
Allow utf-8 page names when not using grit. Resolves #830 (when using rugged adapter).
@dometto dometto merged commit a7dc8d8 into gollum:master Jan 4, 2015
@dometto dometto deleted the 830_pagename_encodings branch January 30, 2015 21:16
rymai pushed a commit to gitlabhq/gitlabhq that referenced this pull request Mar 16, 2016
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
existme pushed a commit to existme/gollum that referenced this pull request Aug 9, 2018
Allow utf-8 page names when not using grit. Resolves gollum#830 (when using rugged adapter).
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.

2 participants