We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
没有对文档进行任何操作,运行项目后所有文档git都检测到有变化,导致多人同步编写时经常有文档冲突并丢失。
The text was updated successfully, but these errors were encountered:
初步猜测为运行编码时,对文档有读写操作,导致文档编码变化,使git检测到文档变化
Sorry, something went wrong.
该问题我也有注意到。
主题确实有对文档内容进行读写的操作,当前的逻辑对文件都进行了一次重写操作,可能是在这一步导致了问题。由于不同系统之间的 eol 符存在差异,从本地提交到 git 服务器 后,重新拉取或他人拉取新提交到本地,在重启 主题进行写入时,都可能会导致 eol 符被替换。git 检测到有修改,当在差异对比中又看不到正确的信息。
eol
一方面,可以给项目添加一个 .gitattributes 文件,添加以下内容:
.gitattributes
* text eol=lf *.txt text eol=crlf
另一方面,最近我着手于优化主题在本地服务中的开发体验,也在尽量的减少不必要的 I/O 操作,因此,我也会在下个版本中,对 主题启动时对所有文档的读写进行优化,尽量避免不必要的读写,这也可以有效避免非正常的文件变化
perf(theme): optimize auto frontmatter I/O, #124
I/O
8d07dab
pengzhanbo
No branches or pull requests
没有对文档进行任何操作,运行项目后所有文档git都检测到有变化,导致多人同步编写时经常有文档冲突并丢失。
The text was updated successfully, but these errors were encountered: