fix: handle unicode chars when syncing files using git storage (#5272)

git has the quotopath option enabled by default,
filepaths with unicode characters will be escaped,
causing the wiki to not handle changes.
This commit is contained in:
myml 2022-05-10 09:39:08 +08:00 committed by GitHub
parent 78d02dc8e5
commit b3731dd26e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,10 @@ module.exports = {
await this.git.init() 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 // Set default author
await this.git.raw(['config', '--local', 'user.email', this.config.defaultEmail]) await this.git.raw(['config', '--local', 'user.email', this.config.defaultEmail])
await this.git.raw(['config', '--local', 'user.name', this.config.defaultName]) await this.git.raw(['config', '--local', 'user.name', this.config.defaultName])