即使在硬重置之后,子模块也总是被修改



我的子模块显示为已修改(我没有触摸任何东西(。我一直试图硬重置它,但没有成功:

~dom/gitmodules/emacswiki heads/master*
❯ git reset --hard upstream/master                                                                         141
HEAD is now at f54d96c32 How to grant GNU Emacs for OS X full disk access
~dom/gitmodules/emacswiki heads/master*
❯ git status -s                              
M AucTeX
M AutoLisp
...

我试着做:

cd ../
git submodule deinit -f .
git submodule update --init
git submodule update -f --recursive

也没什么作用。

这:

它是git://github.com/emacsmirror/emacswiki.org.git,是的,我在macOS上。

是关键。在macOS上克隆该存储库,并使用相当现代的Git在f54d96c32附近检查一些提交,但在案例折叠文件系统上(就像macOS上的默认文件系统一样(,会发出很多警告:

warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:
'Anything'
'anything'
'Artagnon'
'artagnon'
'AUCTeX'
'AucTeX'
'AutoLISP'
'AutoLisp'
'BookMarks'
'Bookmarks'

在区分大小写的文件系统上签出提交f54d96c32,例如,我们可以比较AutoLISP和AutoLISP:这两个文件

$ file AutoLISP AutoLisp
AutoLISP: ASCII text
AutoLisp: ASCII text, with very long lines
$ cat AutoLISP
#REDIRECT AutoLisp
$ cat AutoLisp
AutoLisp is the API for the proprietary computer-aided design system, !AutoCAD. [snip]

要在Mac上正确轻松地检查这一点,您需要在区分大小写的文件系统中工作。例如,请参阅我对如何更改已提交的多个文件的名称大小写的回答?

最新更新