Skip to content

Commit

Permalink
fix: handle unicode chars when syncing files using git storage (requa…
Browse files Browse the repository at this point in the history
…rks#5272)

git has the quotopath option enabled by default,
filepaths with unicode characters will be escaped,
causing the wiki to not handle changes.
  • Loading branch information
myml authored May 10, 2022
1 parent 961900c commit 73ca22c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/modules/storage/git/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ module.exports = {
await this.git.init()
}

// Disable quotePath
// Link https://git-scm.com/docs/git-config#Documentation/git-config.txt-corequotePath
await this.git.raw(['config', '--local', 'core.quotepath', false])

// Set default author
await this.git.raw(['config', '--local', 'user.email', this.config.defaultEmail])
await this.git.raw(['config', '--local', 'user.name', this.config.defaultName])
Expand Down

0 comments on commit 73ca22c

Please sign in to comment.