如何解决即使在硬重置后,子模块也始终被修改
我的子模块显示为已修改(我没有触及那里的任何东西)。我一直在尝试硬重置它无济于事:
~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 上克隆该存储库,并检查 f54d96c32
附近的一些提交,使用相当现代的 Git,但在大小写折叠的文件系统(如 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 上正确且轻松地进行检查,您需要在区分大小写的文件系统中工作。参见例如我对 How do I change case of the names of multiple files,already committed?
的回答版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。