Fix@tinacmsapigit的路径显示功能如何实现?

2026-04-01 23:041阅读0评论SEO资讯
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计198个文字,预计阅读时间需要1分钟。

Fix@tinacms/apigit的路径显示功能如何实现?

该问题有三个部分。首先,Windows路径中可以包含正斜杠或双反斜杠。例如:`1data\author.json`。

PossiblefixforseveralreportsTherearethreepiecestothisbug.First,

Possible fix for several reports

There are three pieces to this bug.

First, on windows path's can contain forward slashes, ordouble back slashes. For example

1data/author.json

or

1data\\author.json

Second, Node's

1path.join

returns the second on Windows.

Fix@tinacms/apigit的路径显示功能如何实现?

Third, the

1git show

command behaves oddly with the former:

1git show HEAD:data/author.json

Returns the contents of the file

1git show HEAD:data/dne.json

Throws an error, and finally

1git show HEAD:data\\author.json

returns an empty string.

This very well may be a bug in Git. I'm not sure.

该提问来源于开源项目:tinacms/tinacms

I wonder if there's an ESLint option for that?

   

本文共计198个文字,预计阅读时间需要1分钟。

Fix@tinacms/apigit的路径显示功能如何实现?

该问题有三个部分。首先,Windows路径中可以包含正斜杠或双反斜杠。例如:`1data\author.json`。

PossiblefixforseveralreportsTherearethreepiecestothisbug.First,

Possible fix for several reports

There are three pieces to this bug.

First, on windows path's can contain forward slashes, ordouble back slashes. For example

1data/author.json

or

1data\\author.json

Second, Node's

1path.join

returns the second on Windows.

Fix@tinacms/apigit的路径显示功能如何实现?

Third, the

1git show

command behaves oddly with the former:

1git show HEAD:data/author.json

Returns the contents of the file

1git show HEAD:data/dne.json

Throws an error, and finally

1git show HEAD:data\\author.json

returns an empty string.

This very well may be a bug in Git. I'm not sure.

该提问来源于开源项目:tinacms/tinacms

I wonder if there's an ESLint option for that?